bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / spatial / transform / _rotation / _promote
function
scipy.spatial.transform._rotation:_promote
source: build-install/usr/lib/python3.14/site-packages/scipy/spatial/transform/_rotation.py:40
Signature
def _promote(*args: ArrayLike, xp: ModuleType) → ArraySummary
Promote arrays to float64 for numpy, else according to the Array API spec.
Extended Summary
The return array dtype follows the following rules: - If quat is an ArrayLike or NumPy array, we always promote to float64 - If quat is an Array from frameworks other than NumPy, we preserve the precision of the input array dtype.
The first rule is required by the cython backend signatures that expect cython.double views. The second rule is necessary to promote non-floating arrays to the correct type in frameworks that may not support double precision (e.g. jax by default).
Aliases
scipy.spatial.transform._rigid_transform._promote