Maintainers
PyGSL is currently maintained by Achim Gaedke, Pierre Schnizer and Charl Linssen.
PyGSL is a Python wrapper for the GNU Scientific Library (GSL). Nearly all modules are wrapped. A lot of tests are covering various functionality.
Please report it as a Github Issue if you find a bug. We are looking forward to contributions of new submodules, while maintaining the available code, and welcome pull requests.
PyGSL moved from Sourceforge to GitHub in 2021.
To build the interface, you will need
Since version 2.6 PyGSL is built using meson-python. Swig must be always installed to build PyGSL.Meson-python will be automatically installed by PyPI during the build process.
PyGSL can also installed using the pip package installer. SWIG is required to be installed and can usually be found via your distribution's package manager (for example, apt install swig).
To install PyGSL from PyPI, first install
pip install --upgrade pip wheel
pip install pygsl
To remove PyGSL, use:
pip uninstall pygsl
It can be useful to install PyGSL locally e.g. if the automatic build process fails. In a first step, update the packages pip and wheel as
pip install --upgrade build
-- code-block:: sh
python3 -m build -w .
Do NOT test the interface in the distribution root directory! -- please install it first and then change to the tests directory and execute python -m pytest ..
Just write in Python
import pygsl.sf print("%g+/-%g"%pygsl.sf.erf(1))
or
import pygsl.rng rng=pygsl.rng.rng() print rng.gaussian(1.0)
You may set the environment variable LD_LIBRARY_PATH to find the gsl shared object.
but is supposed to compile and run on any posix platform.
Currently it is being tested using GitHub Actions continuous integration on:
The directory test will contain several testsuites, based on Python unittest. Change to this directory to run the tests.
What is implemented (versus GSL 2.1):
GSL Capabilites not yet wrapped by PyGSL
- Sorting
- N-tuples
GSL Capabilites partly implemented
- Discrete Hankel Transforms
See also the TODO file in the distribution.
For the exact function volume for a module, please type:
from pygsl.testing import sf dir(sf)
You can do this with the other modules, too. The naming scheme is the same as in GSL.
The function reference can be found in the docstrings and at the gsl-reference.
Written documentation can be found in the doc/ref directory.
See also the examples directory.
Support requests and all other questions should be submitted as a GitHub Issue.
You can browse our git repository.
If you want to contribute to PyGSL, please fork the repository and create a pull request.
The script tools/extract_tool.py generates most of the special function code.
A GSL interface for Python was needed for a project at Center for applied informatics Cologne.
pygsl-0.0.3 was released on May 23, 2001.
PyGSL is currently maintained by Achim Gaedke, Pierre Schnizer and Charl Linssen.