https://github.com/ickc/python-numba_quaternion
Quaternion in any Numba-jit-compiled functions.
https://github.com/ickc/python-numba_quaternion
Last synced: 4 months ago
JSON representation
Quaternion in any Numba-jit-compiled functions.
- Host: GitHub
- URL: https://github.com/ickc/python-numba_quaternion
- Owner: ickc
- License: bsd-3-clause
- Created: 2021-03-18T00:33:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-26T20:43:19.000Z (almost 5 years ago)
- Last Synced: 2025-08-27T05:13:19.857Z (10 months ago)
- Language: Python
- Homepage: https://ickc.github.io/python-numba_quaternion/
- Size: 1.07 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.rst
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
.. This is auto-generated from `docs/README.md`. Do not edit this file directly.
==================================================================================
numba_quaternion—quaternion operations that can be used within Numba-jit functions
==================================================================================
:Date: March 29, 2021
.. contents::
:depth: 3
..
+-------------+----------------------------------------------------------------------------------+
| docs | |Documentation Status| |image2| |
+=============+==================================================================================+
| tests | |GitHub Actions| |Coverage Status| |
| | |
| | |Codacy Code Quality Status| |Scrutinizer Status| |CodeClimate Quality Status| |
+-------------+----------------------------------------------------------------------------------+
| package | |Supported versions| |Supported implementations| |PyPI Wheel| |
| | |
| | |PyPI Package latest release| |GitHub Releases| |Development Status| |Downloads| |
| | |
| | |Commits since latest release| |License| |
+-------------+----------------------------------------------------------------------------------+
| conda-forge | |Conda Recipe| |Conda Downloads| |Conda Version| |Conda Platforms| |
+-------------+----------------------------------------------------------------------------------+
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.
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.
.. |Documentation Status| image:: https://readthedocs.org/projects/python-numba_quaternion/badge/?version=latest
:target: https://python-numba_quaternion.readthedocs.io/en/latest/?badge=latest&style=plastic
.. |image1| image:: https://github.com/ickc/python-numba_quaternion/workflows/GitHub%20Pages/badge.svg
:target: https://ickc.github.io/python-numba_quaternion
.. |GitHub Actions| image:: https://github.com/ickc/python-numba_quaternion/workflows/Python%20package/badge.svg
.. |Coverage Status| image:: https://codecov.io/gh/ickc/python-numba_quaternion/branch/master/graphs/badge.svg?branch=master
:target: https://codecov.io/github/ickc/python-numba_quaternion
.. |Codacy Code Quality Status| image:: https://img.shields.io/codacy/grade/078ebc537c5747f68c1d4ad3d3594bbf.svg
:target: https://www.codacy.com/app/ickc/python-numba_quaternion
.. |Scrutinizer Status| image:: https://img.shields.io/scrutinizer/quality/g/ickc/python-numba_quaternion/master.svg
:target: https://scrutinizer-ci.com/g/ickc/python-numba_quaternion/
.. |CodeClimate Quality Status| image:: https://codeclimate.com/github/ickc/python-numba_quaternion/badges/gpa.svg
:target: https://codeclimate.com/github/ickc/python-numba_quaternion
.. |Supported versions| image:: https://img.shields.io/pypi/pyversions/numba-quaternion.svg
:target: https://pypi.org/project/numba-quaternion
.. |Supported implementations| image:: https://img.shields.io/pypi/implementation/numba-quaternion.svg
:target: https://pypi.org/project/numba-quaternion
.. |PyPI Wheel| image:: https://img.shields.io/pypi/wheel/numba-quaternion.svg
:target: https://pypi.org/project/numba-quaternion
.. |PyPI Package latest release| image:: https://img.shields.io/pypi/v/numba-quaternion.svg
:target: https://pypi.org/project/numba-quaternion
.. |GitHub Releases| image:: https://img.shields.io/github/tag/ickc/python-numba_quaternion.svg?label=github+release
:target: https://github.com/ickc/python-numba_quaternion/releases
.. |Development Status| image:: https://img.shields.io/pypi/status/numba-quaternion.svg
:target: https://pypi.python.org/pypi/numba-quaternion/
.. |Downloads| image:: https://img.shields.io/pypi/dm/numba-quaternion.svg
:target: https://pypi.python.org/pypi/numba-quaternion/
.. |Commits since latest release| image:: https://img.shields.io/github/commits-since/ickc/python-numba_quaternion/v0.2.0.svg
:target: https://github.com/ickc/python-numba_quaternion/compare/v0.2.0...master
.. |License| image:: https://img.shields.io/pypi/l/numba-quaternion.svg
.. |Conda Recipe| image:: https://img.shields.io/badge/recipe-numba_quaternion-green.svg
:target: https://anaconda.org/conda-forge/numba_quaternion
.. |Conda Downloads| image:: https://img.shields.io/conda/dn/conda-forge/numba_quaternion.svg
:target: https://anaconda.org/conda-forge/numba_quaternion
.. |Conda Version| image:: https://img.shields.io/conda/vn/conda-forge/numba_quaternion.svg
:target: https://anaconda.org/conda-forge/numba_quaternion
.. |Conda Platforms| image:: https://img.shields.io/conda/pn/conda-forge/numba_quaternion.svg
:target: https://anaconda.org/conda-forge/numba_quaternion
.. |image2| image:: https://github.com/ickc/python-numba_quaternion/workflows/GitHub%20Pages/badge.svg
:target: https://ickc.github.io/python-numba_quaternion