本文簡要介紹 python 語言中 scipy.spatial.transform.Rotation.approx_equal
的用法。
用法:
Rotation.approx_equal(self, Rotation other, atol=None, degrees=False)#
確定另一個旋轉是否近似等於這個。
平等是通過計算旋轉之間的最小角度並檢查它是否小於 atol 來衡量的。
- other:
Rotation
實例 包含用於測量此旋轉的對象。
- atol: 浮點數,可選
絕對角度公差,低於該公差,旋轉被視為相等。如果沒有給出,則默認設置為 1e-8 弧度。
- degrees: 布爾型,可選
如果給定 True 和 atol,則 atol 以度為單位進行測量。如果為 False(默認值),則 atol 以弧度為單位進行測量。
- other:
- approx_equal: ndarray 或布爾值
旋轉是否近似相等,如果對象包含單個旋轉,則為 bool;如果對象包含多個旋轉,則為 ndarray。
參數 ::
返回 ::
例子:
>>> from scipy.spatial.transform import Rotation as R >>> import numpy as np >>> p = R.from_quat([0, 0, 0, 1]) >>> q = R.from_quat(np.eye(4)) >>> p.approx_equal(q) array([False, False, False, True])
單次旋轉的近似相等:
>>> p.approx_equal(q[0]) False
相關用法
- Python SciPy Rotation.apply用法及代碼示例
- Python SciPy Rotation.as_matrix用法及代碼示例
- Python SciPy Rotation.as_euler用法及代碼示例
- Python SciPy Rotation.as_mrp用法及代碼示例
- Python SciPy Rotation.as_quat用法及代碼示例
- Python SciPy Rotation.as_rotvec用法及代碼示例
- Python SciPy Rotation.align_vectors用法及代碼示例
- Python SciPy Rotation.from_matrix用法及代碼示例
- Python SciPy Rotation.__pow__用法及代碼示例
- Python SciPy Rotation.magnitude用法及代碼示例
- Python SciPy Rotation.from_quat用法及代碼示例
- Python SciPy Rotation.from_mrp用法及代碼示例
- Python SciPy Rotation.__getitem__用法及代碼示例
- Python SciPy Rotation.from_rotvec用法及代碼示例
- Python SciPy Rotation.__mul__用法及代碼示例
- Python SciPy Rotation.inv用法及代碼示例
- Python SciPy Rotation.random用法及代碼示例
- Python SciPy Rotation.from_euler用法及代碼示例
- Python SciPy Rotation.mean用法及代碼示例
- Python SciPy RealData.set_meta用法及代碼示例
- Python SciPy RectBivariateSpline.__call__用法及代碼示例
- Python SciPy RectSphereBivariateSpline.ev用法及代碼示例
- Python SciPy RegularGridInterpolator.__call__用法及代碼示例
- Python SciPy RectSphereBivariateSpline.__call__用法及代碼示例
- Python SciPy RectBivariateSpline.ev用法及代碼示例
注:本文由純淨天空篩選整理自scipy.org大神的英文原創作品 scipy.spatial.transform.Rotation.approx_equal。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。