`scipy.spatial.transform.Rotation` Integration
まだ誰も着手していません。
評価
調査の方向性
再現された scipy.spatial.transform.Rotation.apply 呼び出しから始め、VectorObject3D と VectorNumpy3D のインターフェースを調べます。直接の Rotation 入力と、動作する配列リスト入力を比較し、完了条件を、両方のベクトル形式で Rotation インスタンスが受け入れられ、示された回転が期待される結果を生成することと定義します。
索引モデルが issue の本文から書いたものです。
説明
Vector Version
1.1.1.post1
Python Version
3.10.9
OS / Environment
OS: KAli Linux 2023.3
Environment: scipy==1.11.1
Describe the bug
First of all thanks for the awesome work on the library
there are some errors with Rotation.apply
these are some ways to reproduce
from scipy.spatial.transform import Rotation
from vector import VectorObject3D, VectorNumpy3D
v_object = VectorObject3D(x=1, y=0, z=0)
v_array = VectorNumpy3D({"x": [1], "y": [0], "z": [0]})
r = Rotation.from_quat((0, 0, 1, 1))
# _r = r.as_quat()
# print(v.rotate_quaternion(_r[3], _r[0], _r[1], _r[2]))
# Returns: VectorObject3D(x=0.0, y=0.9999999999999998, z=0.0)
# print(r.apply(v_object)) # Raises: IndexError(tuple index out of range)
print(r.apply(v_object.__array__().tolist()))
# Returns: [0. 1. 0.]
# print(r.apply(v_array)) # Raises: ValueError(Expected input of shape (3,) or (P, 3), got (1,).)
print(r.apply(v_array.tolist()))
# Returns: [[0. 1. 0.]]
I think it would be a good idea to add rotate method to Vector that accepts the Rotation instance as input and applies the rotation on Vector
from scipy.spatial.transform import Rotation
def rotate(self, rot: Rotation):
pass
Any additional but relevant log output
No response
- 主要言語
- Python
- スター
- 101
- フォーク
- 43
- 平均マージ
- 3時間 38分
- マージ済み PR(30日)
- 7
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
scikit-hep/vector のほかの issue
-
Numba object backend: missing to_2D/to_3D/to_4D, momentum-named conversions, and like()再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンfeature
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
scikit-hep/vector#750 ·
-
Add ability to somehow map field names to coordinate axis names that vector expects再び着手できるかも @hjaat が 82 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンfeature
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
scikit-hep/vector#732 · コメント 3 件 ·
-
feature
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
scikit-hep/vector#731 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
scikit-hep/vector#711 · コメント 1 件 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
scikit-hep/vector#654 ·
scikit-hep/vector の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ok-oldking/ok-wuthering-waves#1785 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
healthchecks/healthchecks#1349 ·
-
deployment release-lag
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
nolte/kamerplanter#2374 ·
メンテナーはふだん 1 日以内に返信
-
bug v1 v2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
modelcontextprotocol/python-sdk#3725 ·
メンテナーはふだん 1 日以内に返信
-
batchterms() drops queries without a similar() clause, misaligning results with inputs対応中かも @MohammadHijjawi97 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信