Python wrapper for the libstable C library
Project description
pystable
Python wrapper for the libstable
C library.
Example
To fit with ML estimation:
import pystable
init_fit = {'alpha': 2, 'beta': 0, 'sigma': 1, 'mu': 0,
'parameterization': 1}
dist = pystable.create(init_fit['alpha'], init_fit['beta'],
init_fit['sigma'], init_fit['mu'],
init_fit['parameterization'])
pystable.fit(dist, data, len(data))
fit_params = [dist.contents.alpha, dist.contents.beta,
dist.contents.sigma, dist.contents.mu_0, dist.contents.mu_1]
Setup
Dependencies
Install the GNU Scientific Library (GSL).
Arch Linux:
$ yay gsl
Mac:
$ brew install gsl
Ubuntu:
$ sudo apt install gsl-bin libgsl0-dev
Build libstable
$ cd libstable
$ make
or
$ poetry build
TODO
-
import ctypes as ct
- create lib structure
- create example file utilizing pystable lib
- typings
- handle errors
- handle NULL pointer errors
- handle
err
-
stable_checkparams
- impl
- test
- example
- handle error
- test error
-
stable_create
- impl
- test
- example
-
stable_cdf
- impl
- test
- example
-
stable_pdf
- impl
- test
- example
-
stable_fit
- impl
- test
- example
-
stable_q
- impl
- test
- example
-
stable_rnd
- impl
- test
- example
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
pystable-0.2.3.tar.gz
(399.1 kB
view hashes)
Built Distributions
pystable-0.2.3-py3-none-any.whl
(399.8 kB
view hashes)
Close
Hashes for pystable-0.2.3-cp39-cp39-manylinux_2_33_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1a6371eb1b54581e8999c05239ebda32678118aaab53b47bc28765e959ea95a |
|
MD5 | 5e1eb014a0d6306a6fa82c48bb6358f9 |
|
BLAKE2b-256 | 2aa8c7d6fbb32d9b49fe32f4147f84b8a6bc5ef5ea2b551994737751e3771998 |