From ff3666c9af0ba6ea9cb044190bec622353347e8a Mon Sep 17 00:00:00 2001 From: Yuya Unno Date: Mon, 11 Mar 2024 00:04:27 +0900 Subject: [PATCH 1/3] Fix indexing --- src/quaternion/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quaternion/__init__.py b/src/quaternion/__init__.py index ddc4f48..31b8817 100644 --- a/src/quaternion/__init__.py +++ b/src/quaternion/__init__.py @@ -354,7 +354,7 @@ def from_rotation_matrix(rot, nonorthogonal=True): if not shape: q = zero.copy() eigvals, eigvecs = linalg.eigh(K3.T, subset_by_index=(3, 3)) - q.components[0] = eigvecs[-1] + q.components[0] = eigvecs[-1, 0] q.components[1:] = -eigvecs[:-1].flatten() return q else: From fb83cbad22730b56f68a84e6c0b85f77a9aa7676 Mon Sep 17 00:00:00 2001 From: Mike Boyle Date: Mon, 11 Mar 2024 23:00:29 -0400 Subject: [PATCH 2/3] Update indexing in higher-dimensional case also --- src/quaternion/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quaternion/__init__.py b/src/quaternion/__init__.py index 31b8817..2a4546d 100644 --- a/src/quaternion/__init__.py +++ b/src/quaternion/__init__.py @@ -362,7 +362,7 @@ def from_rotation_matrix(rot, nonorthogonal=True): for flat_index in range(reduce(mul, shape)): multi_index = np.unravel_index(flat_index, shape) eigvals, eigvecs = linalg.eigh(K3[multi_index], subset_by_index=(3, 3)) - q[multi_index+(0,)] = eigvecs[-1] + q[multi_index+(0,)] = eigvecs[-1, 0] q[multi_index+(slice(1,None),)] = -eigvecs[:-1].flatten() return as_quat_array(q) From acb48764ea439a18511ee18da7478d1e9799775a Mon Sep 17 00:00:00 2001 From: Mike Boyle Date: Mon, 11 Mar 2024 23:03:18 -0400 Subject: [PATCH 3/3] Update action-gh-release [skip ci] --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e59e98e..6966457 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -213,7 +213,7 @@ jobs: - name: Create release if: "!contains(github.event.head_commit.message, '[no release]')" id: create_release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: