Skip to main content

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


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 details)

Uploaded Source

Built Distributions

pystable-0.2.3-py3-none-any.whl (399.8 kB view details)

Uploaded Python 3

pystable-0.2.3-cp39-cp39-manylinux_2_33_x86_64.whl (399.7 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.33+ x86-64

File details

Details for the file pystable-0.2.3.tar.gz.

File metadata

  • Download URL: pystable-0.2.3.tar.gz
  • Upload date:
  • Size: 399.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.6 Linux/5.12.14-arch1-1

File hashes

Hashes for pystable-0.2.3.tar.gz
Algorithm Hash digest
SHA256 7dd5fd4fb0d1129f293d7de0b2489c4a53730f477c7d1efef04129973f27f21c
MD5 04dac0d81b3ee3e4b0d455e6e57d867e
BLAKE2b-256 cbf8fe25aa5197216a2ebec5ce7b74a0b692fb221226e99a99a6da20100b9286

See more details on using hashes here.

File details

Details for the file pystable-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: pystable-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 399.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.6 Linux/5.12.14-arch1-1

File hashes

Hashes for pystable-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cef111f537fe0b65c950e7f0a985bffd78da61c445b2fbb92f9eed974f1422e6
MD5 9c937e1566ec14ae36ebb4b56294b047
BLAKE2b-256 1c8d958a5f8ebb4a44454a2ce08b723948c60f0c375c6919ba6c80f9955c36d2

See more details on using hashes here.

File details

Details for the file pystable-0.2.3-cp39-cp39-manylinux_2_33_x86_64.whl.

File metadata

  • Download URL: pystable-0.2.3-cp39-cp39-manylinux_2_33_x86_64.whl
  • Upload date:
  • Size: 399.7 kB
  • Tags: CPython 3.9, manylinux: glibc 2.33+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.6 Linux/5.12.14-arch1-1

File hashes

Hashes for pystable-0.2.3-cp39-cp39-manylinux_2_33_x86_64.whl
Algorithm Hash digest
SHA256 e1a6371eb1b54581e8999c05239ebda32678118aaab53b47bc28765e959ea95a
MD5 5e1eb014a0d6306a6fa82c48bb6358f9
BLAKE2b-256 2aa8c7d6fbb32d9b49fe32f4147f84b8a6bc5ef5ea2b551994737751e3771998

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page