From 89a59acb1706ed42c975998b88c12c17a5cf9ec4 Mon Sep 17 00:00:00 2001 From: Mike Boyle Date: Tue, 29 Oct 2024 14:35:44 -0400 Subject: [PATCH] Adapt to numpy's new definition of the word "copy" Closes #239 --- src/quaternion/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/quaternion/__init__.py b/src/quaternion/__init__.py index c7ffc6c..e71faca 100644 --- a/src/quaternion/__init__.py +++ b/src/quaternion/__init__.py @@ -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: @@ -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)