Skip to content

Commit

Permalink
make a copy of the location array before modifying the input...
Browse files Browse the repository at this point in the history
  • Loading branch information
jcapriot committed Oct 24, 2024
1 parent 7c5dbcd commit 70e128d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions discretize/base/base_tensor_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,7 @@ def _get_interpolation_matrix(
raise ValueError("Points outside of mesh")
else:
indZeros = np.logical_not(self.is_inside(loc))
loc = loc.copy()
loc[indZeros, :] = np.array([v.mean() for v in self.get_tensor("CC")])

location_type = self._parse_location_type(location_type)
Expand Down

0 comments on commit 70e128d

Please sign in to comment.