Skip to main content
radiax

Analytic polynomial roots within JAX

JIT-compatible fully analytic variant of jax.numpy.roots for small-degree polynomials

CI Codecov Ruff ty uv Publish PyPI PyPI - Python Version

Overview

radiax.roots is a drop-in replacement for jax.numpy.roots for polynomials of up to the third degree1. It is fully analytic, with support for complex roots and coefficients. It is JIT-compatible2 and has been benchmarked to be around 15x faster than jax.numpy.roots for cubic polynomials3.

Installation

pip install radiax

Usage

import jax.numpy as jnp
from radiax import roots

# Coefficients of the polynomial: x**3 - 6*x**2 + 11*x - 6
coeffs = jnp.array([1, -6, 11, -6])

# Find the roots of the polynomial
r = roots(coeffs)
print(r)

Footnotes

1 Support for degree 4 (quartic) polynomials has not been implemented yet.

2 Just like with jax.numpy.roots, the optional keyword argument strip_zeros must be set to False for JIT-compatibility.

3 radiax 0.1.0 running on an Intel Core i7-14700 CPU (JAX 0.11.1, Python 3.14.7, Ubuntu 24.04.4).


LMMP

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

radiax-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

radiax-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file radiax-0.1.0.tar.gz.

File metadata

  • Download URL: radiax-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for radiax-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d0a6ea9f495aa20b34e9908c475755d78b1f9e1ad49f9307b0289744f2939934
MD5 2a78e525ff258cff2bdb593a685ea6b7
BLAKE2b-256 de0188c69df509f7e5e0415b6f93ff5acf8a992dd0595ec14ca54a1d8936a567

See more details on using hashes here.

File details

Details for the file radiax-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: radiax-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for radiax-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 12e9974e4cd8b3bb63f110173f98ae9facf6a30e8b38f7a6110fc844d524fa3e
MD5 e12de762e80c3d6a3f3251ed12a07ca5
BLAKE2b-256 33413fe639192959afa32d65a65e3b11fc477e289aa5136529079cb45df28332

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page