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.27.tar.gz
(181.9 kB
view hashes)
Built Distributions
Close
Hashes for ncephes-1.0.27-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a6acb15ff69636b39c3358ebcc4465093f4257d6201a4ff4fe900e935733bd5 |
|
MD5 | 957b8fd294b55a8d5000d4f2df982127 |
|
BLAKE2b-256 | 015cf81091ee6fb5b50a18b8251dddb222ac0d3197abfb983e05b2407907c7be |
Close
Hashes for ncephes-1.0.27-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02a08b3db86922f511be29bc6bd8cfbab0865ef3bc06d3e49e21f6d1551297cc |
|
MD5 | e5f7743f4ca5de35c9cc5bfea1ed456b |
|
BLAKE2b-256 | b72cfb1191c8fc959e13410d7c0c5b7d99333d639761924c9926618e040857d3 |
Close
Hashes for ncephes-1.0.27-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0363a711a364edfe425093c28d3203feaf863d24e81bd567f4e9a234d2a73e4c |
|
MD5 | 8ee2a9dbaac4a60329013799da734e16 |
|
BLAKE2b-256 | bd79cb7a264cb4f4187dab41cfffc172a92a40d4109ef7baec3154a9c34149ae |
Close
Hashes for ncephes-1.0.27-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d6639da851cb2e6cde09ee735e3e3dca01f3f124c24a53924d44f86d4c7c8a5 |
|
MD5 | 28c362545ac75fbbeadee2d9962eca23 |
|
BLAKE2b-256 | cd910f627338bfd853f7fd758dc7fd941d33f7c118d91f4cac282157500a7e62 |
Close
Hashes for ncephes-1.0.27-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 160813603ba7db6ab4df5a05aa91998aa6095e6d1d22245009576a73d33884ef |
|
MD5 | 3bdc9cff0abc8462737775bd5e7e5c54 |
|
BLAKE2b-256 | 3d132f41132a05316eb71ab27dc49b49f600966f7a61a300413b8f99b609d8c5 |
Close
Hashes for ncephes-1.0.27-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6495615430b88f7af28d6eb50f064e3db7e15100f25a379776d090d083a3b3f |
|
MD5 | b3aa0cc4c5e586163231ab0c8406caf6 |
|
BLAKE2b-256 | 093ac8cccb7c0f418465115d9080ab56b68a87c039a7fb244ddd7132ef004e8a |
Close
Hashes for ncephes-1.0.27-cp27-cp27m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc96bbb545ac420bb635c5a1ce8926324998fbc8aeae11916feac54c0057b397 |
|
MD5 | ed33acc53d6b3c67653c0d3e1e3737b4 |
|
BLAKE2b-256 | a5654aed99ca49e0643af7f62676205d852c484f10132e748ffddc83af39029b |