Skip to content

Commit

Permalink
Adapt to numpy's new definition of the word "copy"
Browse files Browse the repository at this point in the history
Closes #239
  • Loading branch information
moble committed Oct 29, 2024
1 parent 0b19822 commit 7db8c5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/quaternion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def from_rotation_matrix(rot, nonorthogonal=True):
except ImportError:
linalg = False

rot = np.array(rot, copy=False)
rot = np.asarray(rot)
shape = rot.shape[:-2]

if linalg and nonorthogonal:
Expand Down Expand Up @@ -456,7 +456,7 @@ def from_rotation_vector(rot):
rotations. Output shape is rot.shape[:-1].
"""
rot = np.array(rot, copy=False)
rot = np.asarray(rot)
quats = np.zeros(rot.shape[:-1]+(4,))
quats[..., 1:] = rot[...]/2
quats = as_quat_array(quats)
Expand Down

0 comments on commit 7db8c5d

Please sign in to comment.