gempy
gempy copied to clipboard
Automaticly set at least two points per surface
Right now we only raise an assert error. Ideally, we would duplicate the single point and print a warn massage. Possibly at the computation moment.
This is the code that makes the trick:
id_only_one_bool = geo_model.surface_points.df['id'].value_counts() == 1 id_only_one = id_only_one_bool.index[id_only_one_bool] single_vals = geo_model.surface_points.df[geo_model.surface_points.df['id'].isin(id_only_one)] for idx, vals in single_vals.iterrows(): print(i[1]['X']) geo_model.add_surface_points(vals['X'], vals['Y'], vals['Z'], vals['surface'])