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.24.tar.gz
(181.9 kB
view hashes)
Built Distributions
Close
Hashes for ncephes-1.0.24-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebbfd052fe4cc039405f8ee4bd04ac6c6dd8be7eb45b4ca7c0fc5d961e4cf4b4 |
|
MD5 | d2da1c9af758032ad3217210a2944136 |
|
BLAKE2b-256 | d5684b09fe35debd761486c7c12997aa9a8788afcaeccab5542d52068d15dd5c |
Close
Hashes for ncephes-1.0.24-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0bae94b570c5af2579f2648f11e74f5d3f0fbced951bf557e1de2f73022fefe |
|
MD5 | 1f8b1786f7a9425eab3265c58ba05000 |
|
BLAKE2b-256 | c8ad528b00d19101fe22cecd4408e15678e2c1f342fde334e31f65956be21d15 |
Close
Hashes for ncephes-1.0.24-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 815fe5e1329e5547a9cca75449973b572adc2b64de4ea8736945f27f322e3a3b |
|
MD5 | 263c471e130867f2818abbf124b35339 |
|
BLAKE2b-256 | 64661289ff9bb9ce7984eebe7f73eb4f6c094fdcfceab45d4c99b53f74b0e87b |
Close
Hashes for ncephes-1.0.24-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8362af09772c6367338851ff0c0278e324c08ab0df93fc5beab1d40d24543350 |
|
MD5 | 7a233987caa40a6801feeceba346f5e7 |
|
BLAKE2b-256 | af5653e8d8837e475aa641fef0f272e891f47ebad177143fab8c7123807690a5 |
Close
Hashes for ncephes-1.0.24-cp27-cp27m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11a3ed3197ac8f4cd820b87a1a07ba8e5e358af6652b7bb2335bf77ab81167e9 |
|
MD5 | 8a2a92b4fe4bee4ea3a1632ff3e8ce8f |
|
BLAKE2b-256 | 724ed6c813b4b0b2a19529fcccb8cba5204b279eb2109d5848b1a5d87fada0f3 |