From 01b62735c040b94a47a29098d69d89e192439372 Mon Sep 17 00:00:00 2001 From: Garrett Wright Date: Tue, 13 Jan 2026 08:45:39 -0500 Subject: [PATCH] array shape patch for scipy 1.17.0 --- src/aspire/utils/rotation.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/aspire/utils/rotation.py b/src/aspire/utils/rotation.py index de814f31f9..20806f86e3 100644 --- a/src/aspire/utils/rotation.py +++ b/src/aspire/utils/rotation.py @@ -293,6 +293,9 @@ def about_axis(axis, angles, dtype=None, gimble_lock_warnings=True): f"Expected `angles` to have shape (N,1), got {angles.shape}" ) + # Scipy's `from_euler` >=1.17.0 no longer accepts 1D array, reshape (N,1) + angles = angles.reshape(-1, 1) + rotation = sp_rot.from_euler(axis, angles, degrees=False) matrix = rotation.as_matrix().astype(dtype) rot = Rotation(matrix, gimble_lock_warnings=gimble_lock_warnings)