transformations
Homogeneous Transformation Matrices and Quaternions
What it is and what it does
Transformations is a Python library for working with 3D homogeneous transformation matrices and quaternions. It provides functions to construct and manipulate 4x4 matrices for common 3D operations—translation, rotation, scaling, shearing, reflection, and projection—and to convert between different rotation representations (matrices, Euler angles, quaternions). The library also includes utilities like matrix decomposition and an Arcball control object for interactive 3D rotation.
The package depends only on numpy and includes a C extension for performance-critical operations. It is maintained but explicitly noted as no longer actively developed; the author recommends considering alternatives like Pytransform3d, scipy.spatial.transform, or transforms3d for new projects. The API is not stable and may change between releases.
Use it for:
- Convert between Euler angles and rotation matrices in computer graphics or robotics pipelines.
- Compose multiple 3D transformations (rotation, translation, scaling) into a single matrix.
- Decompose a transformation matrix into its constituent scale, shear, rotation, and translation components.
- Work with quaternions for smooth 3D rotations and interpolation in animation or game engines.
- Implement Arcball-style interactive 3D rotation controls in visualization applications.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Calculates 4x4 homogeneous transformation matrices for 3D coordinate operations (translation, rotation, scaling, shearing) and converts between rotation matrices, Euler angles, and quaternions.
Yes, if you are working with legacy code or have a specific need for homogeneous transformation matrices and quaternion conversions. The package is stable, permissively licensed, and actively maintained. However, for new projects, consider the alternatives mentioned in the documentation (Pytransform3d, scipy.spatial.transform, transforms3d) which may offer more active development and fewer known numerical instabilities.
Install
transformations on PyPI
pip
pip install transformationsuv
uv add transformationspoetry
poetry add transformationsInstalling transformations
Before you install
Medium install friction due to compiled C extensions, but wheels are widely available for modern Python versions (3.12+) and common platforms. Actively maintained with recent updates; last commit 2026-08-09.
License in practice
BSD-3-Clause is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you include the license notice.
Quickstart
import numpy
from transformations import rotation_matrix, euler_from_matrix
R = rotation_matrix(0.5, [1, 0, 0]) # 0.5 rad rotation around x-axis
angles = euler_from_matrix(R, 'rxyz')
Requires numpy 2.5.2 (or compatible version); Python 3.12 or later.
Verify before relying
- Whether the known numerical instabilities mentioned in the description affect your specific use case.
- Performance characteristics compared to the suggested alternatives (Pytransform3d, scipy.spatial.transform, transforms3d).
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.12) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — numpy |
| Maintenance | actively maintained — 5 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,247,443/month — #4,163 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: transformations-2026.8.8-cp312-abi3-macosx_10_13_x86_64.whl; transformations-2026.8.8-cp312-abi3-macosx_11_0_arm64.whl; transformations-2026.8.8-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; transformations-2026.8.8-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; transformations-2026.8.8-cp312-abi3-pyemscripten_2025_0_wasm32.whl; transformations-2026.8.8-cp312-abi3-pyemscripten_2026_0_wasm32.whl; transformations-2026.8.8-cp312-abi3-pyemscripten_2026_5_wasm32.whl; transformations-2026.8.8-cp312-abi3-win32.whl; transformations-2026.8.8-cp312-abi3-win_amd64.whl; transformations-2026.8.8-cp312-abi3-win_arm64.whl; transformations-2026.8.8-cp314-cp314t-macosx_10_15_x86_64.whl; transformations-2026.8.8-cp314-cp314t-macosx_11_0_arm64.whl; transformations-2026.8.8-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; transformations-2026.8.8-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; transformations-2026.8.8-cp314-cp314t-win32.whl; transformations-2026.8.8-cp314-cp314t-win_amd64.whl; transformations-2026.8.8-cp314-cp314t-win_arm64.whl; transformations-2026.8.8-cp315-cp315t-macosx_10_15_x86_64.whl; transformations-2026.8.8-cp315-cp315t-macosx_11_0_arm64.whl; transformations-2026.8.8-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Tags
More Mathematics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
kiwisolverkiwisolver is a Python binding to a fast C++…
permissive · top 1,000 on PyPI
sympySymPy is a Python library for symbolic…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
torchPyTorch provides GPU-accelerated tensor…
permissive · top 1,000 on PyPI
onnxruntimeonnxruntime loads and executes Open Neural…
permissive · top 1,000 on PyPI
euclid3Provides 2D and 3D vector, matrix, quaternion,…
unclear · top 15,000 on PyPI
jaxliejaxlie implements Lie groups (SO2, SE2, SO3,…
permissive · top 15,000 on PyPI
numpy-quaternionAdds a quaternion dtype to NumPy, enabling…
permissive · top 5,000 on PyPI
pyquaternionProvides quaternion representation,…
permissive · top 5,000 on PyPI
romaRoMa provides differentiable conversions…
permissive · top 15,000 on PyPI
transforms3dConverts between different 3D geometric…
permissive · top 15,000 on PyPI
affineAffine provides a Python class for representing…
permissive · top 5,000 on PyPI
pytransform3dpytransform3d provides operations, conversions,…
permissive · top 15,000 on PyPI
pyglmPyGLM provides Python bindings to OpenGL…
permissive · top 15,000 on PyPI
hankelComputes Hankel transforms and integrals using…
permissive · top 15,000 on PyPI