Ncephes
Python interface for the Cephes library.
Install / Use
/learn @limix/NcephesREADME
NCephes
This package provides a python interface for the
Cephes library. It also supports
Numba and its nopython mode.
Usage
>>> from ncephes import incbet
>>> print("{:.3f}".format(incbet(1., 3., 0.3)))
0.657
You 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.657
and 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.657
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
- Danilo Horta -https://github.com/Horta
License
This project is licensed under the MIT License - see the LICENSE file for details
Related Skills
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
