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.28.tar.gz
(181.9 kB
view hashes)
Built Distributions
Close
Hashes for ncephes-1.0.28-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31fd7d224d7d02a30630e476de864e40a189bcfa2a40595625bbcd968d2212e6 |
|
MD5 | a75ff2c77322ec42abc043e36cd15db4 |
|
BLAKE2b-256 | 446f8368f3cb2848a7a0e9a29ba6b369c52827de35168fe1786c86bc5b976e91 |
Close
Hashes for ncephes-1.0.28-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | abc973d065bc404f80db58a330e881b7b6a4d33f47c0a4ba9ce6530d01071315 |
|
MD5 | 6b0dd2eb69afdf7afabbe7cb1f69f91e |
|
BLAKE2b-256 | 799bbc944467dd08bbcb36e137b9252dbce2d2920e168b74a1a36166864164ad |
Close
Hashes for ncephes-1.0.28-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68b08ae8e59596003f99b319d7488fb3ba0c3cbecc7dbae1707d82af77e4c5ce |
|
MD5 | c492cf094684dfa9b94113b816d32469 |
|
BLAKE2b-256 | e5e8711beaacc9fa18f003f8e5b946d8163afd44896b6b698bf32edac59807a3 |
Close
Hashes for ncephes-1.0.28-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cdd991dd9a6ca6f492675fedfd65c06dff9699bfe2e9790bc851e7dc6b38075 |
|
MD5 | 3f17d5d438e680c4ae717c03e22c799c |
|
BLAKE2b-256 | fa63efee2d594f1e58b981e001a3bc9217ff2c451b55553a1d10cf1f08c28fe0 |