Python interface for the Cephes library.
Project description
This package provides a python interface for the Cephes library. It also supports Numba and its nopython mode.
Usage
from ncephes import cprob
print(cprob.incbet(1., 3., 0.3))
prints 0.657.
You can also call them inside a numba function
from ncephes import cprob
from numba import jit
@jit
def numba_incbet(a, b, x):
return cprob.incbet(a, b, x)
print(numba_incbet(1., 3., 0.3))
and with nopython mode and nogil enabled
from ncephes import cprob
from numba import jit
incbet = cprob.incbet
@jit(nogil=True, nopython=True)
def numba_incbet(a, b, x):
return incbet(a, b, x)
print(numba_incbet(1., 3., 0.3))
One can also statically link the compiled Cephes libraries ncprob and ncellf. Please, have a peek at the examples/prj_name for a minimalistic example.
Install
The recommended way of installing it is via conda
conda install -c conda-forge ncephes
An alternative way would be via pip
pip install ncephes
Running the tests
After installation, you can test it
python -c "import ncephes; ncephes.test()"
as long as you have pytest.
License
This project is licensed under the MIT License - see the LICENSE file for details
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ncephes-1.0.25.tar.gz
(181.9 kB
view hashes)
Built Distributions
Close
Hashes for ncephes-1.0.25-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ea110a5f9048e2c276027a44f698e05d2a0bc0f6fa340f2aea40e260878ee2f |
|
MD5 | 7f37bdac475b591b76b8297930511886 |
|
BLAKE2b-256 | daa0e9bb762863b2ff14778403c7b980d0bd5e18c74db92b2c8c30012528e076 |
Close
Hashes for ncephes-1.0.25-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 808c9e171ca0d1eae59d5dde9254739118734dc225f84b7b6c33877d7be3ca25 |
|
MD5 | 5e877d2e060deb2f852fc32724aeae8f |
|
BLAKE2b-256 | 3f7e9d0441fc1fcf3c20e6f6ae3d148a0915339ea937313543cae8b4d1a64dc0 |
Close
Hashes for ncephes-1.0.25-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2796772846ee1007ff49458989ef540364222e6f4d88e1d661e480a25db0c074 |
|
MD5 | 68ef71e9ee4510f5beb414284c4fc2e0 |
|
BLAKE2b-256 | faa1e92935fcf4d759a3427d102eeafb5cf8c077c702161fd79b15b2a7a20afd |
Close
Hashes for ncephes-1.0.25-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3867ce62faa256aa4389a9cf98d95569dfbfe44b0643997eaef29501df133bb |
|
MD5 | 01b29aaa14f91274c1053d873db139f6 |
|
BLAKE2b-256 | d604f0bafff619db45406f3142dabb1025d8cf896f4c621a43fa1e786991ebe7 |
Close
Hashes for ncephes-1.0.25-cp27-cp27m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e6a4b1ee60db5c9bf3046a4af7618c847e06101669c2f72f584c9840332d56c |
|
MD5 | 0a926a4ac3afc28f17bf315a00af6a6b |
|
BLAKE2b-256 | f80799d10d0a5c7de9cea4c447f1d0264f408562cbfd771bc89e98f0dfb044d2 |