Registry / ai-ml / rowan
library1.3.2pypypi✓ verified 86d ago

A Python library for performing quaternion operations using NumPy arrays. Provides functions for quaternion creation, normalization, rotation, interpolation, and conversion between quaternions and other rotation representations (e.g., rotation matrices, axis-angle). Current version: 1.3.2, released 2023-04-03. Release cadence is irregular.

pip install rowan
INSTALL
IMPORT
SIG · ROWAN
R
rowan
ai-mlpythonv1.3.2
Install
3.8s avg
Import
260ms
Disk
89MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.3.2 · 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.95 runs
installs and imports cleanly · install 0.0s · import 0.250s · 89.6MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.8s · import 0.270s · 86MB
89MB installed
● package 89MB
Code
Verified usage

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

rowan
import rowan
from rowan import *
Importing * pollutes the namespace; prefer explicit functions.

Create a quaternion from axis-angle, rotate a vector, and convert to rotation matrix.

import rowan import numpy as np # Create a quaternion from axis-angle (radians) axis = np.array([0, 0, 1]) angle = np.pi / 2 q = rowan.from_axis_angle(axis, angle) # Rotate a vector v = np.array([1, 0, 0]) v_rot = rowan.rotate(q, v) print(v_rot) # [0, 1, 0] # Convert to rotation matrix R = rowan.to_matrix(q) print(R)
Debug
Known issues
gotcharowan expects inputs as numpy arrays, not lists. Passing plain Python lists may cause unexpected errors or silently produce wrong results.
fix
Always convert lists to np.array before passing to rowan functions.
affects: all
gotchaQuaternion conventions: rowan uses the scalar-first convention (q = [w, x, y, z]). Some other libraries (e.g., scipy) use scalar-last. Mixing conventions will cause incorrect rotations.
fix
When interfacing with other libraries, convert conventions explicitly: for rowan use [w, x, y, z].
affects: all
gotchaThe function `rowan.from_axis_angle` expects the axis to be normalized. If the axis is not unit length, the quaternion will represent a rotation with incorrect angle.
fix
Normalize the axis vector using `axis / np.linalg.norm(axis)` before passing.
affects: all
Errors
Common errors & fixes
AttributeError: module 'rowan' has no attribute 'from_axis_angle'
Older versions of rowan (<1.0?) use different function names, e.g., `rowan.from_axisangle` (no underscore). Check installed version.
fix
Upgrade to latest rowan: `pip install --upgrade rowan` or use the correct old name: `rowan.from_axisangle`.
TypeError: Object arrays are not supported
Input numpy array has dtype=object, often because it contains mixed types or is created from a ragged list.
fix
Ensure array has homogeneous numeric dtype, e.g., `np.array(..., dtype=np.float64)`.
Upgrade
Version history
1.3.2latest on PyPI · released Oct 28, 2024
Audit
Dependencies
numpyrequiredCore dependency; rowan operates on numpy arrays.
Agent activity
19 hits · last 30 days
node
12
OpenAI (training)
1
Resources
rowan — pip install rowan · libregistry