Skip to content

Commit

Permalink
Merge pull request #80 from jcapriot/asarray_copy
Browse files Browse the repository at this point in the history
Use the `copy()` method instead of `copy` kwarg
  • Loading branch information
jcapriot authored Oct 24, 2024
2 parents 6dd06bf + 69d8ef7 commit 3b1f8d5
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 3b1f8d5

Please sign in to comment.