Skip to content

Commit 70e128d

Browse files
committed
make a copy of the location array before modifying the input...
1 parent 7c5dbcd commit 70e128d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

discretize/base/base_tensor_mesh.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,7 @@ def _get_interpolation_matrix(
721721
raise ValueError("Points outside of mesh")
722722
else:
723723
indZeros = np.logical_not(self.is_inside(loc))
724+
loc = loc.copy()
724725
loc[indZeros, :] = np.array([v.mean() for v in self.get_tensor("CC")])
725726

726727
location_type = self._parse_location_type(location_type)

0 commit comments

Comments
 (0)