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.38.tar.gz
(181.8 kB
view hashes)
Built Distributions
Close
Hashes for ncephes-1.0.38-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2614f05d329b2034b577883ccae7be7a95f5e1aacb7b88a4c2edfd1e6c4d54ea |
|
MD5 | c2ce7322e7d65a150dbd22fd8aafaa9f |
|
BLAKE2b-256 | 67b3739ea06eb5ea2b2105a5b6f401fce1d2d54cba47b6bd66e07ad73d93126c |
Close
Hashes for ncephes-1.0.38-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d633c9491aa15dd49ceb7135813a1649bf042dc38c28453d218be059e924ab80 |
|
MD5 | 78a95e22bd9e0101ab68bd198f1289ed |
|
BLAKE2b-256 | fd91cf0a1b34c527521af16b5cfeaea4edf14f35f1a0c98448690ae5f636f585 |
Close
Hashes for ncephes-1.0.38-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90e9d5284a8b50781bfd675df510569c6896a408e8af51f35f0e4e0bea0596b6 |
|
MD5 | 5b504a83ab0bd66599b3c2ae81758e30 |
|
BLAKE2b-256 | 1ec46733c61a63b1f65894f182569bfd7ec00e5bbf2ac1a006e154acdbc0d8fa |
Close
Hashes for ncephes-1.0.38-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df05e84baab47d8752df841f5467cbfd30c92cc17de8a53cadf79b32c3903114 |
|
MD5 | e3663fd3cf4234212d66e4cc6be1de8f |
|
BLAKE2b-256 | a2d4d2f5e2943614136f4f75c61639edc87bc58e016429b49cb89a086685a2c7 |
Close
Hashes for ncephes-1.0.38-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85ad96bdc354e4b564f056037da89bcb0ed0b05367b6bdb4e03d5ea66393a17c |
|
MD5 | 60e357fdb971cc9473a4bcffbd6b8812 |
|
BLAKE2b-256 | 620096e5cf76da79feceb79bb52fbedd374f62eb2a11523903aaa2b3848bbf5d |
Close
Hashes for ncephes-1.0.38-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf5d23cf4da2ba805da08d13e4e403ddf0300ae1fc6bb11656afbc328a1ebb90 |
|
MD5 | a1f5db278e4069430bc178957b66da25 |
|
BLAKE2b-256 | ba8d09f54c8130a05373bd4fc3eaef6e0d438741747b49b6e4e849706958a66e |
Close
Hashes for ncephes-1.0.38-cp27-cp27m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1b617f177a1c122d86ba88e3f95511d296c3975ee841c70519d81fbca42a4a5 |
|
MD5 | 4fe727dad7e30c59211bb3d9d68c22c0 |
|
BLAKE2b-256 | 5592aab8142c8866a4d5b2d7e424e81077d06a14b761c7b797ff33a9178ccb1d |