Python interface for the Cephes library.
Project description
# nCephes
[![PyPI-License](https://img.shields.io/pypi/l/ncephes.svg?style=flat-square)](https://pypi.python.org/pypi/ncephes/) [![PyPI-Version](https://img.shields.io/pypi/v/ncephes.svg?style=flat-square)](https://pypi.python.org/pypi/ncephes/) [![Anaconda-Version](https://anaconda.org/conda-forge/ncephes/badges/version.svg)](https://anaconda.org/conda-forge/ncephes) [![Anaconda-Downloads Badge](https://anaconda.org/conda-forge/ncephes/badges/downloads.svg)](https://anaconda.org/conda-forge/ncephes) [![Documentation Status](https://readthedocs.org/projects/ncephes/badge/?style=flat-square&version=latest)](https://ncephes.readthedocs.io/)
This package provides a python interface for the
[Cephes](http://www.netlib.org/cephes/) library.
It also supports [Numba](http://numba.pydata.org) and its ``nopython`` mode.
## Usage
```python
from ncephes import cprob
print(cprob.incbet(1., 3., 0.3))
```
prints ``0.657``.
You can also call them inside a numba function
```python
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
```python
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](http://conda.pydata.org/docs/index.html)
```bash
conda install -c conda-forge ncephes
```
An alternative way would be via pip
```bash
pip install ncephes
```
## Running the tests
After installation, you can test it
```
python -c "import ncephes; ncephes.test()"
```
as long as you have [pytest](http://docs.pytest.org/en/latest/).
## Authors
* **Danilo Horta** - [https://github.com/Horta](https://github.com/Horta)
## License
This project is licensed under the MIT License - see the
[LICENSE](LICENSE) file for details
[![PyPI-License](https://img.shields.io/pypi/l/ncephes.svg?style=flat-square)](https://pypi.python.org/pypi/ncephes/) [![PyPI-Version](https://img.shields.io/pypi/v/ncephes.svg?style=flat-square)](https://pypi.python.org/pypi/ncephes/) [![Anaconda-Version](https://anaconda.org/conda-forge/ncephes/badges/version.svg)](https://anaconda.org/conda-forge/ncephes) [![Anaconda-Downloads Badge](https://anaconda.org/conda-forge/ncephes/badges/downloads.svg)](https://anaconda.org/conda-forge/ncephes) [![Documentation Status](https://readthedocs.org/projects/ncephes/badge/?style=flat-square&version=latest)](https://ncephes.readthedocs.io/)
This package provides a python interface for the
[Cephes](http://www.netlib.org/cephes/) library.
It also supports [Numba](http://numba.pydata.org) and its ``nopython`` mode.
## Usage
```python
from ncephes import cprob
print(cprob.incbet(1., 3., 0.3))
```
prints ``0.657``.
You can also call them inside a numba function
```python
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
```python
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](http://conda.pydata.org/docs/index.html)
```bash
conda install -c conda-forge ncephes
```
An alternative way would be via pip
```bash
pip install ncephes
```
## Running the tests
After installation, you can test it
```
python -c "import ncephes; ncephes.test()"
```
as long as you have [pytest](http://docs.pytest.org/en/latest/).
## Authors
* **Danilo Horta** - [https://github.com/Horta](https://github.com/Horta)
## License
This project is licensed under the MIT License - see the
[LICENSE](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.30.tar.gz
(180.3 kB
view hashes)
Built Distributions
Close
Hashes for ncephes-1.0.30-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 766ff4ed71c2f508236b88391c04b612174f1cd68c7e6e9526df4f62611d78c2 |
|
MD5 | 5f3c972faabcc5b192cd0588bf99c085 |
|
BLAKE2b-256 | 7121dea01898d5b7bb9ea46c32e09f05a5d5640cfee05ecb56d5c72d120e23a4 |
Close
Hashes for ncephes-1.0.30-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cdb6f498f0917a2628ea060ea11b1300ef52532bae9b17e1687b6ae229e8418 |
|
MD5 | a3795813701d237f91ed05576cbbb8ab |
|
BLAKE2b-256 | a7fa5ae308244d5d9ba888150d77d03c3ff588b11735fc35169c02bb7cbb1cfa |
Close
Hashes for ncephes-1.0.30-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a0d4c5e6928b78b183de5e76765a8bb6f44410ea967309d74f8c93d8c8d0caa |
|
MD5 | 0c98473fc997c17514bb3dc995a8b407 |
|
BLAKE2b-256 | f674c5ee9318cb4375d270f372bf7fce10be0c0437201f5060c647d14f45880d |
Close
Hashes for ncephes-1.0.30-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 504fc017f3b1fd900fc79d507931a96825ca50e1eda5d7c22367588a6e845758 |
|
MD5 | 76494d3adc1a8e2d128df158d9e9a684 |
|
BLAKE2b-256 | 2202e069fe86af9d19990c0c0e53d7eb59b98ad5a4eee5bf74e9ccc764ca107e |
Close
Hashes for ncephes-1.0.30-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aacac0c7803116f21dead95cdfe9dc4c3d74b1c4dea5afe09b5a2dba373565ed |
|
MD5 | d5eea201f06f6a5e6b80a534876eab48 |
|
BLAKE2b-256 | 778b81c225261ad38cb398dc3b28d4757f32041a6f8626e022e2d9a101950a90 |
Close
Hashes for ncephes-1.0.30-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08853290f57246adef1783aa43a6bcb4a4f7fb8e9ae73842a8b7193dc1c8aca4 |
|
MD5 | 0ca6cfc22938e524d7550023d361eb15 |
|
BLAKE2b-256 | 4e4499fb0b1839add639a9e0692399dc3398d33237b975ecd7213dac740670e1 |
Close
Hashes for ncephes-1.0.30-cp27-cp27m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33735ce3f40d8fd66e423cc549f3650990930f15b74e4742d515a9628708a251 |
|
MD5 | 8fa414207e917c40ba4a6f1ef4e9143d |
|
BLAKE2b-256 | 29b6bbf5c36a7c2bc95c7028ed136ff0058e034b5fd1d294841c394d0b9dd55e |