Skip to main content

Jacobi Poly

CI Status Documentation Status Test coverage percentage

uv Ruff pre-commit

PyPI Version Supported Python versions License


Documentation: https://jacobi-poly.readthedocs.io

Source Code: https://github.com/34j/jacobi-poly


Compute Jacobi polynomial from order 0 to N efficiently in NumPy / PyTorch / JAX / array API

Installation

Install this via pip (or your favourite package manager):

pip install jacobi-poly

Usage

from jacobi_poly import jacobi_all, gegenbauer_all, legendre_all
import torch

# Both CPU (Numba) and CUDA (Numba for CUDA) are supported.
torch.set_default_device("cuda")

x = torch.asarray(1.0)  # the points to evaluate at
alpha = torch.asarray(2.0)
beta = torch.asarray(3.0)
n_end = 4  # from order 0 to order 3

# Jacobi polynomial from order 0 to 3
jacobi = jacobi_all(x, alpha=alpha, beta=beta, n_end=n_end)
print(jacobi)
# tensor([ 1.,  3.,  6., 10.], device='cuda:0')

# Gegenbauer polynomial from order 0 to 3
gegenbauer = gegenbauer_all(x, alpha=alpha, n_end=n_end)
print(gegenbauer)
# tensor([ 1.0000,  4.0000, 10.0000, 20.0000], device='cuda:0')

# Generalized Legendre polynomial from order 0 to 3
# If ndim == 3, same as Legendre polynomial
legendre = legendre_all(x, n_end=n_end, ndim=3)
print(legendre)
# tensor([1., 1., 1., 1.], device='cuda:0')

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits

Copier

This package was created with Copier and the browniebroke/pypackage-template project template.

Metadata

Release files for jacobi-poly 1.0.6

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

Source distribution (sdist)

Source distribution for jacobi-poly 1.0.6
File Size Uploaded
jacobi_poly-1.0.6.tar.gz 12.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jacobi-poly 1.0.6
File Interpreter ABI Platform
jacobi_poly-1.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 21.5 kB

Release files / jacobi_poly-1.0.6.tar.gz

Download URL jacobi_poly-1.0.6.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9c85e615a220c7f9ad8769f7ae6ffde9267d03a573bd3be6f2e747e61481f9af
BLAKE2b-256 checksum
How to use checksums
f45339d1ee12c08a3ccd426401ba1cd9dfd7f47c85d4c73c5fc6f4c86ef02fac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 4, 2026.

Transparency log

Release files / jacobi_poly-1.0.6-py3-none-any.whl

Download URL jacobi_poly-1.0.6-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
afc24c89e6c7cc5d52cbd54b3f6b3de0a7ddd4cb66bd56190db22b20c2355cf4
BLAKE2b-256 checksum
How to use checksums
944a7eb8bd7466947029a57a8dcdad5a5f25e2fd5726e9e96876d06ec5a2fa59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.6 This release

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.0

2 release files

0.0.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