Skip to content

Commit ed61243

Browse files
fix: Ensure modifications to data frame are on a copy of that frame
1 parent e8775c2 commit ed61243

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

LoopStructural/modelling/core/geological_model.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,9 +1455,8 @@ def create_and_add_domain_fault(self, fault_surface_data, **kwargs):
14551455
self._add_domain_fault_below(domain_fault)
14561456

14571457
domain_fault_uc = UnconformityFeature(domain_fault, 0)
1458-
# iterate over existing features and add the unconformity as a
1459-
# region so the feature is only
1460-
# evaluated where the unconformity is positive
1458+
# iterate over existing features and add the unconformity as a region
1459+
# so the feature is only evaluated where the unconformity is positive
14611460
return domain_fault_uc
14621461

14631462
def create_and_add_fault(
@@ -1551,7 +1550,7 @@ def create_and_add_fault(
15511550
# add data
15521551
fault_frame_data = self.data.loc[
15531552
self.data["feature_name"] == fault_surface_data
1554-
]
1553+
].copy()
15551554
trace_mask = np.logical_and(
15561555
fault_frame_data["coord"] == 0, fault_frame_data["val"] == 0
15571556
)

0 commit comments

Comments
 (0)