Skip to content

Commit

Permalink
copy argument was added in 2.0, so use the .copy() method instead
Browse files Browse the repository at this point in the history
For backwards compatibility with older `numpy`
  • Loading branch information
jcapriot committed Oct 24, 2024
1 parent 6dd06bf commit 69d8ef7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions geoana/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,8 @@ def rotation_matrix_from_normals(v0, v1, tol=1e-20, as_matrix=True):
The rotation matrix from v0 to v1, whose type depends on the `as_matrix` parameter.
"""

v0 = np.asarray(v0, dtype=float, copy=True).squeeze()
v1 = np.asarray(v1, dtype=float, copy=True).squeeze()
v0 = np.asarray(v0, dtype=float).copy().squeeze()
v1 = np.asarray(v1, dtype=float).copy().squeeze()

if v0.shape != (3, ):
raise ValueError(f"v0 shape should be (3,), got {v0.shape}")
Expand Down

0 comments on commit 69d8ef7

Please sign in to comment.