Skip to main content

PyTorch extension package for Bessel functions with arbitrary real order and complex inputs

Project description

About

PyTorch extension package for Bessel functions with arbitrary real order and complex inputs

Install

Currently only supports Linux (with CUDA 12.4) or MacOS (Apple silicon, cpu only) with python >= 3.9, <= 3.12.

pip install torch-bessel

Example

import torch_bessel

real, imag = torch.randn(2, 5, device="cuda")
z = torch.complex(real.abs(), imag)  # correctness for inputs in the left-half complex plane is not gauranteed.
torch_bessel.ops.modified_bessel_k0(z)

Implemented functions

  • modified_bessel_k0: Same as torch.special.modified_bessel_k0, but also handles backpropagation and complex inputs on cpu and cuda. Correctness is guaranteed on the right-half complex plane. On the left-half complex plane, function output appears mostly correct, but with small numerical errors for certain inputs. On the negative real line, output is NaN.

WIP

  • modified_bessel_kv: Analogue of scipy.special.kv.

Benchmarks

Benchmarking performed with the asv package. Results can be viewed at https://hchau630.github.io/torch-bessel.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

torch_bessel-0.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

torch_bessel-0.0.5-cp312-cp312-macosx_11_0_arm64.whl (81.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

torch_bessel-0.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

torch_bessel-0.0.5-cp311-cp311-macosx_11_0_arm64.whl (81.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

torch_bessel-0.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

torch_bessel-0.0.5-cp310-cp310-macosx_11_0_arm64.whl (80.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

torch_bessel-0.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.1 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

torch_bessel-0.0.5-cp39-cp39-macosx_11_0_arm64.whl (80.6 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file torch_bessel-0.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torch_bessel-0.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 33ad14fc08c7a272549e35a3d06440ca53115a720ad4595c96547b19b7f80461
MD5 ce9f0d837e46d1d8f3ea29f2f70470f6
BLAKE2b-256 bac48c272e93f12ccda014487569e4b520600b67df611266d8ffc08123aef8f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_bessel-0.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build_and_deploy.yml on hchau630/torch-bessel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_bessel-0.0.5-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for torch_bessel-0.0.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9f83c3a6ac217ee516f16368ead238eb611001c52d76e61f15f1537847cea54a
MD5 baa47fb28f3a3626d90a8dae5ce3d399
BLAKE2b-256 68f20158b5ce4a880605989ad2f2037abee671c66380c39faf18d0cbdc416640

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_bessel-0.0.5-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: build_and_deploy.yml on hchau630/torch-bessel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_bessel-0.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torch_bessel-0.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f831bf7d0bd8625fe51ab5e8299bd959858dae5d76f34e5f799d9bbca8860447
MD5 ec70ed621b447f313b86d8ac4d67c2da
BLAKE2b-256 0595d3aeda69fab5e6c7b5d5d0c94a28045fb63d8cae47311291410c4ccbf6a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_bessel-0.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build_and_deploy.yml on hchau630/torch-bessel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_bessel-0.0.5-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for torch_bessel-0.0.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 366c4058b7e836ec60f75944a3c800b3a5139faa642b7cb9bbaf3ff07409845c
MD5 c65461c820e7b9db7176841b6bc62587
BLAKE2b-256 7f27358cb72c0f8f29d2dc7665e4eedb3e45db2f3b2ddd328346c06035c7dc1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_bessel-0.0.5-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: build_and_deploy.yml on hchau630/torch-bessel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_bessel-0.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torch_bessel-0.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8556ce4d014db982f2e13ea2f920dc9d6dd1fa8b380bf36f4022d4f21a15505b
MD5 21665b835e00fc5ed0b6ea6bb26b52e2
BLAKE2b-256 cb4b17475e73d3f3a374f562ae3355c962ee26630876d2f418454ff1217ac643

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_bessel-0.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build_and_deploy.yml on hchau630/torch-bessel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_bessel-0.0.5-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for torch_bessel-0.0.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7f894f0e2e00cab44dbe5ea5ec06b9151beb3d3935c0e645738edfe21ce9d9a8
MD5 3c408781c6d76bcd2d68c9a42270d46c
BLAKE2b-256 10e5b5f234c316c5e9df58b204a3f44b37e9274cb94d74b3db65ff09b6fc1e71

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_bessel-0.0.5-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: build_and_deploy.yml on hchau630/torch-bessel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_bessel-0.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torch_bessel-0.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 884ec8709d59eb7bbb4a4f88b28415d40d825bbd771da493c0fc408546acf4b9
MD5 d82acf0b51c233be379ca55da7cf9d16
BLAKE2b-256 1b0e29aa5b85e5327f25dae137d03ad6a5d867f9dfdf5f020e5e7d669cac0c4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_bessel-0.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build_and_deploy.yml on hchau630/torch-bessel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_bessel-0.0.5-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for torch_bessel-0.0.5-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9e039a6901e60946fbce4b86ff70142543bae96b502cf9434adf05ede9cd3378
MD5 79296d4be523e09d5ce1ecc1aa73f8e0
BLAKE2b-256 b1a28f022b0661c5e7d6d43b8583999533eed4f79fb0192b3df91f675e3b2279

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_bessel-0.0.5-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: build_and_deploy.yml on hchau630/torch-bessel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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