From 69d8ef77b59580d3bb9a25054b2da89e8375e160 Mon Sep 17 00:00:00 2001 From: Joseph Capriotti Date: Thu, 24 Oct 2024 09:03:40 -0600 Subject: [PATCH] copy argument was added in 2.0, so use the .copy() method instead For backwards compatibility with older `numpy` --- geoana/spatial.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geoana/spatial.py b/geoana/spatial.py index 163d0a69..401d4305 100644 --- a/geoana/spatial.py +++ b/geoana/spatial.py @@ -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}")