Registry / data / transformations

transformations

JSON →
library2026.1.18pypypiunverified

Transformations is a Python library for calculating 4x4 matrices for translating, rotating, reflecting, scaling, shearing, projecting, orthogonalizing, and superimposing arrays of 3D homogeneous coordinates, as well as for converting between rotation matrices, Euler angles, and quaternions. It is no longer actively developed and is largely superseded by other libraries.

pip install -U transformations
INSTALL
IMPORT
SIG · TRANSFORMATIONS
T
transformations
datapythonv2026.1.18
Install
3.7s avg
Import
286ms
Disk
87MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2025.1.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
build_error
glibc
py 3.103.920 runs
installs and imports cleanly · install 3.7s · import 0.286s · 86MB
87MB installed
● package 87MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

transformations
import transformations as tf
Common practice to alias for brevity and to distinguish from other transformation libraries.

This quickstart demonstrates how to create rotation and translation matrices and apply them to a 3D point using homogeneous coordinates. It also shows how to concatenate transformations.

import numpy as np import transformations as tf # Create a rotation matrix around the Z-axis by 90 degrees (pi/2 radians) angle = np.pi / 2 rotation_matrix = tf.rotation_matrix(angle, [0, 0, 1]) # Define a point in homogeneous coordinates (x, y, z, w=1) point = np.array([1.0, 0.0, 0.0, 1.0]) # Apply the transformation transformed_point = np.dot(rotation_matrix, point) print(f"Original point: {point[:3]}") print(f"Rotation matrix:\n{rotation_matrix}") print(f"Transformed point: {transformed_point[:3]}") # Create a translation matrix translation_matrix = tf.translation_matrix([5.0, 2.0, 0.0]) # Concatenate transformations (apply rotation then translation) combined_matrix = np.dot(translation_matrix, rotation_matrix) combined_transformed_point = np.dot(combined_matrix, point) print(f"\nCombined transformation matrix:\n{combined_matrix}") print(f"Combined transformed point: {combined_transformed_point[:3]}")
Debug
Known issues
deprecatedThe 'transformations' library is no longer actively developed and is largely superseded by other, more actively maintained modules like Pytransform3d, Scipy.spatial.transform, Transforms3d, or Numpy-quaternion. Consider using these alternatives for new projects.
fix
Migrate to a more actively maintained library such as `scipy.spatial.transform` or `transforms3d` for new development. For existing code, be aware that support may be limited.
affects: 2024.1.6 and later
breakingThe API is explicitly stated as 'not stable yet and is expected to change between revisions.' This means minor version updates might introduce breaking changes.
fix
Pin the library version in your `requirements.txt` (e.g., `transformations==2026.1.18`) and thoroughly test after any upgrade. Review the `CHANGES` file on GitHub before updating.
affects: All versions
gotchaQuaternions in this library are represented as `[w, x, y, z]`. This differs from some other common libraries (e.g., older ROS `tf.transformations` used `[x, y, z, w]`), which can lead to incorrect calculations if not handled carefully.
fix
Always verify the quaternion convention when integrating with other libraries or systems. Convert components if necessary to match the expected order.
affects: All versions
gotchaThe Python implementation of transformations is not optimized for speed. For performance-critical applications, consider using the `transformations.c` module (if available in your distribution) or alternative libraries that offer optimized (e.g., C/Cython backed) implementations.
fix
For speed-critical paths, profile your code and consider rewriting parts using a faster library or the `transformations.c` module. The core `numpy` operations are generally fast, but some high-level functions might have overhead.
affects: All versions
gotchaTransformation matrices generated by this library might require transposing when interfacing with some other graphics systems, such as OpenGL's `glMultMatrixd()`, due to differing column-major/row-major conventions.
fix
When passing matrices to external graphics APIs, test and, if necessary, transpose the matrix (e.g., `M.T`) to ensure correct orientation and position.
affects: All versions
Upgrade
Version history
2026.1.18latest on PyPI · released Jan 17, 2026
Audit
Dependencies
numpyrequiredRequired for array manipulations and mathematical operations.
Agent activity
23 hits · last 30 days
node
18
Amazon
1
OpenAI (training)
1
Resources
transformations — pip install transformations · libregistry