Skip to main content

Python interface for the Cephes library

Project description

Ncephes

Travis AppVeyor Documentation Status

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.

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ncephes, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size ncephes-1.1.0-cp27-cp27m-macosx_10_6_intel.whl (113.7 kB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size ncephes-1.1.0-cp27-cp27m-manylinux1_x86_64.whl (149.4 kB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size ncephes-1.1.0-cp27-cp27mu-manylinux1_x86_64.whl (149.4 kB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size ncephes-1.1.0-cp36-cp36m-macosx_10_6_intel.whl (113.8 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size ncephes-1.1.0-cp36-cp36m-manylinux1_x86_64.whl (146.2 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size ncephes-1.1.0-cp36-cp36m-win_amd64.whl (32.4 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size ncephes-1.1.0-cp37-cp37m-macosx_10_6_intel.whl (113.8 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size ncephes-1.1.0-cp37-cp37m-manylinux1_x86_64.whl (146.2 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size ncephes-1.1.0-cp37-cp37m-win_amd64.whl (32.4 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size ncephes-1.1.0.tar.gz (9.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page