This package provides a python interface for the
Cephes library. It also supports
Numba and its nopython mode.
>>> from ncephes import incbet
>>> print("{:.3f}".format(incbet(1., 3., 0.3)))
0.657You can also call them inside a numba function
>>> from ncephes import incbet
>>> from numba import jit
>>>
>>> @jit
... def numba_incbet(a, b, x):
... return incbet(a, b, x)
>>>
>>> print("{:.3f}".format(numba_incbet(1., 3., 0.3)))
0.657and with nopython mode and nogil enabled
>>> from ncephes import incbet
>>> from numba import jit
>>>
>>> @jit(nogil=True, nopython=True)
... def numba_incbet(a, b, x):
... return incbet(a, b, x)
>>>
>>> print("{:.3f}".format(numba_incbet(1., 3., 0.3)))
0.657One can also statically link the compiled Cephes libraries ncprob and
ncellf. Please, have a peek at the examples/prj_name for a
minimalistic example.
The recommended way of installing it is via conda
conda install -c conda-forge ncephesAn alternative way would be via pip
pip install ncephesAfter installation, you can test it
python -c "import ncephes; ncephes.test()"as long as you have pytest.
- Danilo Horta -https://github.com/Horta
This project is licensed under the MIT License - see the LICENSE file for details