Skip to main content

numba_quaternion

CI Documentation PyPI Python versions conda-forge License

Quaternion operations that can be used within Numba-jit functions.

Introduction

This package contains some numba-jit-compiled functions that perform Quaternion operations and a convenient class Quaternion that provide convenient methods wrapping around those functions.

Quaternion behaves like a Numpy array containing quaternion, e.g. respect Numpy broadcast operations, but without really imitating a numpy.ndarray and implemented a dtype.

This design allows you to write any jit-compiled functions involving those provided jit-compiled functions, and then write your own class methods that calls those functions as a convenient interface (by class inheritance.)

If you do not care to use Quaternion in other jit-compiled functions you write, check out packages below instead.

Installation

pip install numba-quaternion
# or
conda install -c conda-forge numba_quaternion

Other Python quaternion projects

Other Python projects that implements quaternions and I knew and used are:

  • zonca/quaternionarray: written in pure Python using Numpy. Note that unusually they put the real part in the last column. lastcol_quat_to_canonical and canonical_quat_to_lastcol convert between those and the canonical ordering (where real part comes first.)
  • hpc4cmb/toast: toast.qarray is a reimplementation of the above quaternionarray package in C++ with the same interface, and following the same convention.
  • moble/quaternion: implement Quaternion as a Numpy dtype in C.
  • moble/quaternionic: implement Quaternion as a Numpy dtype using Numba. This package is inspired by my expectation of quaternionic—I expected I could use them in a Numba-jit-compiled function but it doesn't.

Release files for numba-quaternion 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for numba-quaternion 0.3.0
File Size Uploaded
numba_quaternion-0.3.0.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for numba-quaternion 0.3.0
File Interpreter ABI Platform
numba_quaternion-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.8 kB

Release files / numba_quaternion-0.3.0.tar.gz

Download URL numba_quaternion-0.3.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c2054ab7a2e4103763832861542ede6654b49918430942b10232b6a9ee95c312
BLAKE2b-256 checksum
How to use checksums
0ef4a3105e3214c8499bccf5842aaa99fe4e981ed52d6fcda1723c7e157a4385
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release files / numba_quaternion-0.3.0-py3-none-any.whl

Download URL numba_quaternion-0.3.0-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
383fbddce83db6b0508a7ef4f6f41bb12827bb02644e0961211feae073ee33ca
BLAKE2b-256 checksum
How to use checksums
d1c15457553092c25772e0f6f697670182f7a9ff8633ce1c6729359b16ebb7e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page