PyGSL application programming interface

pygsl

Wrapper for the GNU Scientific Library.

This module provides the following submodules:
  • blas

  • chebyshev

  • combination

  • const

  • diff

  • eigen

  • fit

  • histogram

  • ieee

  • integrate

  • interpolation

  • linalg

  • math

  • minimize

  • multifit

  • multifit_nlin

  • multimin

  • multiroots

  • odeiv

  • permutation

  • poly

  • qrng

  • rng

  • roots

  • siman

  • sf

  • statistics

Homepage: https://github.com/pygsl/pygsl

Warning

If you want to use setup from the environement you have to call pygsl.ieee.env_setup() and pygsl.rng.env_setup() explicitly!

pygsl.set_debug_level(level)[source]

Allows to set the debug level if implemented in the init function.

Parameters:

level – A level of 0 deactivates all messages. The higher the level gets the more messages are printed.

Silently ignores this function if the functionality was not compiled into pygsl during build time.

These messages are compiled into the modules written in C. The level is stored as a c variable in the module level for each module. This can be useful to find the reason why PyGSL crashes during execution.

pygsl.get_debug_level()[source]

Get the debug level

See pygsl.set_debug_level() for details.

Submodules

errno

The error numbers as provided by GSL. Typically the error numbers are converted to exceptions. These exceptions are listed in pygsl.errors. Some functions (e.g. iterators or steppers) use return values to show that progress can be made (e.g. GSL_CONTINUE).

See also <gsl/gsl_errno.h>

pygsl.errno.GSL_SUCCESS = 0

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_FAILURE = -1

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_CONTINUE = -2

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_EDOM = 1

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_ERANGE = 2

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_EFAULT = 3

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_EINVAL = 4

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_EFAILED = 5

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_EFACTOR = 6

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_ESANITY = 7

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_ENOMEM = 8

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_EBADFUNC = 9

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_ERUNAWAY = 10

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_EMAXITER = 11

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_EZERODIV = 12

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_EBADTOL = 13

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_ETOL = 14

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_EUNDRFLW = 15

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_EOVRFLW = 16

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_ELOSS = 17

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_EROUND = 18

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_EBADLEN = 19

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_ENOTSQR = 20

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_ESING = 21

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_EDIVERGE = 22

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_EUNSUP = 23

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_EUNIMPL = 24

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_ECACHE = 25

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_ETABLE = 26

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_ENOPROG = 27

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_ENOPROGJ = 28

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_ETOLF = 29

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_ETOLX = 30

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_ETOLG = 31

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.GSL_EOF = 32

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.PyGSL_ESTRIDE = 64

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.PyGSL_EUNIMPL = 65

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.errno.PyGSL_EINIT = 66

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

errors

Exceptions raised by pygsl

GSL error codes are translated to python exceptions. These exceptions are listed here. As far as appropriate the exceptions are derived from python exceptions.

The GSL error codes can be accessed from pygsl.errno

pygsl.errors.get_exceptions()[source]

Returns the exceptions defined within this module

Used by the pygsl.init module. This is used by the C helper functions to turn an error reported by gsl by the C error code to the appropriate python exception

pygsl.errors.get_warnings()[source]

Returns the warnings defined within this module

Used by the pygsl.init module. This is used by the C helper functions to turn an error reported by gsl by the C error code to the appropriate python warning

exception pygsl.errors.gsl_AccuracyLossError[source]

Bases: gsl_ArithmeticError

failed to reach the specified tolerance

errno = 17

gsl error number pygsl.errno.GSL_ELOSS

exception pygsl.errors.gsl_ArithmeticError[source]

Bases: gsl_Error, ArithmeticError

base of all common arithmetic exceptions

exception pygsl.errors.gsl_BadFuncError[source]

Bases: gsl_Error

problem with user-supplied function

errno = 9

gsl error number pygsl.errno.GSL_EBADFUNC

exception pygsl.errors.gsl_BadLength[source]

Bases: gsl_Error

matrix; vector lengths are not conformant

errno = 19

gsl error number pygsl.errno.GSL_EBADLEN

exception pygsl.errors.gsl_BadToleranceError[source]

Bases: gsl_Error

user specified an invalid tolerance

errno = 13

gsl error number pygsl.errno.GSL_EBADTOL

exception pygsl.errors.gsl_CacheLimitError[source]

Bases: gsl_Error

cache limit exceeded

errno = 25

gsl error number pygsl.errno.GSL_ECACHE

exception pygsl.errors.gsl_DivergeError[source]

Bases: gsl_ArithmeticError

integral or series is divergent

errno = 22

gsl error number pygsl.errno.GSL_EDIVERGE

exception pygsl.errors.gsl_DomainError[source]

Bases: gsl_Error

Domain Error. e.g. sqrt(-1)

errno = 1

gsl error number pygsl.errno.GSL_EDOM

exception pygsl.errors.gsl_DomainWarning[source]

Bases: gsl_Warning

used by pygsl.histogram

errno = 1

error number pygsl.errno.GSL_EDOM

exception pygsl.errors.gsl_EOFError[source]

Bases: gsl_Error, EOFError

end of file

errno = 32

gsl error number pygsl.errno.GSL_EOF

exception pygsl.errors.gsl_Error[source]

Bases: Exception

base of all gsl exceptions

IsA = 'gsl_Error'
errno = None
exception pygsl.errors.gsl_FactorizationError[source]

Bases: gsl_Error

factorization failed

errno = 6

gsl error number pygsl.errno.GSL_EFACTOR

exception pygsl.errors.gsl_FloatingPointError[source]

Bases: gsl_Error, FloatingPointError

base of all common floating point errors

exception pygsl.errors.gsl_GenericError[source]

Bases: gsl_Error

generic failure

errno = 5

gsl error number pygsl.errno.GSL_EFAILED

exception pygsl.errors.gsl_InvalidArgumentError[source]

Bases: gsl_Error

invalid argument supplied by user

errno = 4

gsl error number pygsl.errno.GSL_EINVAL

exception pygsl.errors.gsl_JacobianEvaluationError[source]

Bases: gsl_ArithmeticError

jacobian evaluations are not improving the solution

errno = 28

gsl error number pygsl.errno.GSL_ENOPROGJ

exception pygsl.errors.gsl_MatrixNotSquare[source]

Bases: gsl_Error

matrix not square

errno = 20

gsl error number pygsl.errno.GSL_ENOTSQR

exception pygsl.errors.gsl_MaximumIterationError[source]

Bases: gsl_ArithmeticError

exceeded max number of iterations

errno = 11

gsl error number pygsl.errno.GSL_EMAXITER

exception pygsl.errors.gsl_NoHardwareSupportError[source]

Bases: gsl_Error

requested feature is not supported by the hardware

errno = 23

gsl error number pygsl.errno.GSL_EUNSUP

exception pygsl.errors.gsl_NoProgressError[source]

Bases: gsl_ArithmeticError

iteration is not making progress towards solution

errno = 27

gsl error number pygsl.errno.GSL_ENOPROG

exception pygsl.errors.gsl_NotImplementedError[source]

Bases: gsl_Error, NotImplementedError

requested feature not (yet) implemented

errno = 24

gsl error number pygsl.errno.GSL_EUNIMPL

exception pygsl.errors.gsl_OverflowError[source]

Bases: gsl_Error, OverflowError

Overflow Error

errno = 16

gsl error number pygsl.errno.GSL_EOVERFLW

exception pygsl.errors.gsl_PointerError[source]

Bases: gsl_Error

invalid pointer

This error is typically raised if GSL is checking a pointer and that pointer is NULL.

errno = 3

gsl error number pygsl.errno.GSL_EFAULT

exception pygsl.errors.gsl_RangeError[source]

Bases: gsl_ArithmeticError

output range error, e.g. exp(1e100)

errno = 2

gsl error number pygsl.errno.GSL_ERANGE

exception pygsl.errors.gsl_RoundOffError[source]

Bases: gsl_ArithmeticError

failed because of roundoff error

errno = 18

gsl error number pygsl.errno.GSL_EFOUND

exception pygsl.errors.gsl_RunAwayError[source]

Bases: gsl_ArithmeticError

iterative process is out of control

errno = 10

gsl error number pygsl.errno.GSL_ERUNAWAY

exception pygsl.errors.gsl_SanityCheckError[source]

Bases: gsl_Error

sanity check failed - shouldn’t happen

errno = 7

gsl error number pygsl.errno.GSL_ESANITY

exception pygsl.errors.gsl_SingularityError[source]

Bases: gsl_ArithmeticError

apparent singularity detected

errno = 21

gsl error number pygsl.errno.GSL_ESING

exception pygsl.errors.gsl_TableLimitError[source]

Bases: gsl_Error

Table limit exceeded

errno = 26

gsl error number pygsl.errno.GSL_ETABLE

exception pygsl.errors.gsl_ToleranceError[source]

Bases: gsl_ArithmeticError

failed to reach the specified tolerance

errno = 14

gsl error number pygsl.errno.GSL_ETOL

exception pygsl.errors.gsl_ToleranceFError[source]

Bases: gsl_ArithmeticError

cannot reach the specified tolerance in F

errno = 29

gsl error number pygsl.errno.GSL_ETOLF

exception pygsl.errors.gsl_ToleranceGradientError[source]

Bases: gsl_ArithmeticError

cannot reach the specified tolerance in gradient

errno = 31

gsl error number pygsl.errno.GSL_ETOLG

exception pygsl.errors.gsl_ToleranceXError[source]

Bases: gsl_ArithmeticError

cannot reach the specified tolerance in X

errno = 30

gsl error number pygsl.errno.GSL_ETOLX

exception pygsl.errors.gsl_UnderflowError[source]

Bases: gsl_Error, OverflowError

Underflow error

errno = 15

gsl error number pygsl.errno.GSL_EUNDRFLW

exception pygsl.errors.gsl_Warning[source]

Bases: Warning

base of all gsl warnings

errno = None
exception pygsl.errors.gsl_ZeroDivisionError[source]

Bases: gsl_Error, ZeroDivisionError

zero Division Error

errno = 12

gsl error number pygsl.errno.GSL_EZERODIV

exception pygsl.errors.pygsl_NotImplementedError[source]

Bases: gsl_NotImplementedError

Base for all Errors, which are known but not implemented yet!

errno = 65

pygsl error number pygsl.errno.PyGSL_EUNIMPL

exception pygsl.errors.pygsl_NotInitalised[source]

Bases: gsl_SanityCheckError

gsl_error calls a c callback, which saves the reason, file name, line number and the GSL errno.

This errno is stored when the save state is initalised and flags that gsl_error was not yet called.

errno = 66

pygsl error number pygsl.errno.PyGSL_EINIT

exception pygsl.errors.pygsl_StrideError[source]

Bases: gsl_SanityCheckError

Could not recalculate a stride of a python array object to the stride of a gsl_vector or gsl_matrix.

errno = 64

pygsl error number pygsl.errno.PyGSL_ESTRIDE

class pygsl.errors._ErrorSafeState[source]

Access to the last error stored by gsl

If PyGSL does not set gsl_error handler to off, the installed error handler will store the arguments passed by gsl_error_handler to a single static variable in pygsl.init. This variable is exported to python space by this class.

If pygsl raises an exception, this state here should be automatically reset.

Used gsl functions:
pygsl.errors.error_safe_state = <pygsl.errors._ErrorSafeState object>

Access to the last error stored by gsl

If PyGSL does not set gsl_error handler to off, the installed error handler will store the arguments passed by gsl_error_handler to a single static variable in pygsl.init. This variable is exported to python space by this class.

If pygsl raises an exception, this state here should be automatically reset.

Used gsl functions:

math

pygsl.math.coerce_double(x[, ret])

Wrapper for gsl_coerce_double() c code signature: double gsl_coerce_double(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.expm1(x[, ret])

Wrapper for gsl_expm1() c code signature: double gsl_expm1(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.fcmp(x1, x2, epsilon[, ret])

Wrapper for gsl_fcmp() c code signature: int gsl_fcmp(const double x1, const double x2, const double epsilon) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d__Rl__O

Parameters:
  • x1 (double) – positional argument 0

  • x2 (double) – positional argument 1

  • epsilon (double) – positional argument 2

  • ret (int) – positional argument 3

Return type:

int

Returns:

result

pygsl.math.fdiv(x, y[, ret])

Wrapper for gsl_fdiv() c code signature: double gsl_fdiv(const double x, const double y) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.finite(x[, ret])

Wrapper for gsl_finite() c code signature: int gsl_finite(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__O

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

Return type:

int

Returns:

result

pygsl.math.frexp(x[, ret, e])

Wrapper for gsl_frexp() c code signature: double gsl_frexp(const double x, int* e) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__Ol

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

  • e (int) – positional argument 2

Return type:

tuple(:param double ret: positional argument 1, :param int e: positional argument 2)

Returns:

result

pygsl.math.hypot(x, y[, ret])

Wrapper for gsl_hypot() c code signature: double gsl_hypot(const double x, const double y) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.hypot3(x, y, z[, ret])

Wrapper for gsl_hypot3() c code signature: double gsl_hypot3(const double x, const double y, const double z) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d__Rd__O

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • z (double) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

pygsl.math.isinf(x[, ret])

Wrapper for gsl_isinf() c code signature: int gsl_isinf(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__O

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

Return type:

int

Returns:

result

pygsl.math.isnan(x[, ret])

Wrapper for gsl_isnan() c code signature: int gsl_isnan(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__O

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

Return type:

int

Returns:

result

pygsl.math.ldexp(x, e[, ret])

Wrapper for gsl_ldexp() c code signature: double gsl_ldexp(const double x, const int e) Wrapped by ufunc PyGSL_sf_ufunc_Id_l__Rd__O

Parameters:
  • x (double) – positional argument 0

  • e (int) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.log1p(x[, ret])

Wrapper for gsl_log1p() c code signature: double gsl_log1p(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

Special Functions

Airy Functions

pygsl.math.sf_airy_Bi_deriv_e(x, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_airy_Bi_deriv_e() c code signature: int gsl_sf_airy_Bi_deriv_e(const double x, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_airy_Ai_deriv_scaled(x, mode[, ret])

Wrapper for gsl_sf_airy_Ai_deriv_scaled() c code signature: double gsl_sf_airy_Ai_deriv_scaled(const double x, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rd__O

Parameters:
  • x (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_airy_zero_Ai_deriv_e(s[, ret, result.val, result.err])

Wrapper for gsl_sf_airy_zero_Ai_deriv_e() c code signature: int gsl_sf_airy_zero_Ai_deriv_e( unsigned int s, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rl__Ord

Parameters:
  • s (unsigned int) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_airy_Bi_scaled_e(x, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_airy_Bi_scaled_e() c code signature: int gsl_sf_airy_Bi_scaled_e(const double x, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_airy_Bi(x, mode[, ret])

Wrapper for gsl_sf_airy_Bi() c code signature: double gsl_sf_airy_Bi(const double x, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rd__O

Parameters:
  • x (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_airy_zero_Bi_deriv(s[, ret])

Wrapper for gsl_sf_airy_zero_Bi_deriv() c code signature: double gsl_sf_airy_zero_Bi_deriv( unsigned int s) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rd__O

Parameters:
  • s (unsigned int) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_airy_Bi_deriv(x, mode[, ret])

Wrapper for gsl_sf_airy_Bi_deriv() c code signature: double gsl_sf_airy_Bi_deriv(const double x, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rd__O

Parameters:
  • x (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_airy_zero_Bi_deriv_e(s[, ret, result.val, result.err])

Wrapper for gsl_sf_airy_zero_Bi_deriv_e() c code signature: int gsl_sf_airy_zero_Bi_deriv_e( unsigned int s, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rl__Ord

Parameters:
  • s (unsigned int) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_airy_Bi_e(x, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_airy_Bi_e() c code signature: int gsl_sf_airy_Bi_e(const double x, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_airy_Ai_deriv_scaled_e(x, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_airy_Ai_deriv_scaled_e() c code signature: int gsl_sf_airy_Ai_deriv_scaled_e(const double x, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_airy_Ai_scaled(x, mode[, ret])

Wrapper for gsl_sf_airy_Ai_scaled() c code signature: double gsl_sf_airy_Ai_scaled(const double x, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rd__O

Parameters:
  • x (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_airy_Bi_scaled(x, mode[, ret])

Wrapper for gsl_sf_airy_Bi_scaled() c code signature: double gsl_sf_airy_Bi_scaled(const double x, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rd__O

Parameters:
  • x (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_airy_Ai_scaled_e(x, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_airy_Ai_scaled_e() c code signature: int gsl_sf_airy_Ai_scaled_e(const double x, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_airy_Ai_e(x, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_airy_Ai_e() c code signature: int gsl_sf_airy_Ai_e(const double x, const gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_airy_Ai_deriv_e(x, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_airy_Ai_deriv_e() c code signature: int gsl_sf_airy_Ai_deriv_e(const double x, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_airy_zero_Ai_deriv(s[, ret])

Wrapper for gsl_sf_airy_zero_Ai_deriv() c code signature: double gsl_sf_airy_zero_Ai_deriv( unsigned int s) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rd__O

Parameters:
  • s (unsigned int) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_airy_zero_Ai_e(s[, ret, result.val, result.err])

Wrapper for gsl_sf_airy_zero_Ai_e() c code signature: int gsl_sf_airy_zero_Ai_e( unsigned int s, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rl__Ord

Parameters:
  • s (unsigned int) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_airy_Bi_deriv_scaled_e(x, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_airy_Bi_deriv_scaled_e() c code signature: int gsl_sf_airy_Bi_deriv_scaled_e(const double x, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_airy_zero_Bi(s[, ret])

Wrapper for gsl_sf_airy_zero_Bi() c code signature: double gsl_sf_airy_zero_Bi( unsigned int s) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rd__O

Parameters:
  • s (unsigned int) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_airy_Bi_deriv_scaled(x, mode[, ret])

Wrapper for gsl_sf_airy_Bi_deriv_scaled() c code signature: double gsl_sf_airy_Bi_deriv_scaled(const double x, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rd__O

Parameters:
  • x (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_airy_zero_Ai(s[, ret])

Wrapper for gsl_sf_airy_zero_Ai() c code signature: double gsl_sf_airy_zero_Ai( unsigned int s) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rd__O

Parameters:
  • s (unsigned int) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_airy_zero_Bi_e(s[, ret, result.val, result.err])

Wrapper for gsl_sf_airy_zero_Bi_e() c code signature: int gsl_sf_airy_zero_Bi_e( unsigned int s, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rl__Ord

Parameters:
  • s (unsigned int) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_airy_Ai(x, mode[, ret])

Wrapper for gsl_sf_airy_Ai() c code signature: double gsl_sf_airy_Ai(const double x, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rd__O

Parameters:
  • x (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_airy_Ai_deriv(x, mode[, ret])

Wrapper for gsl_sf_airy_Ai_deriv() c code signature: double gsl_sf_airy_Ai_deriv(const double x, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rd__O

Parameters:
  • x (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

Bessel Functions

pygsl.math.sf_bessel_Kn(n, x[, ret])

Wrapper for gsl_sf_bessel_Kn() c code signature: double gsl_sf_bessel_Kn(const int n, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rd__O

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_bessel_i0_scaled_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_i0_scaled_e() c code signature: int gsl_sf_bessel_i0_scaled_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_i1_scaled(x[, ret])

Wrapper for gsl_sf_bessel_i1_scaled() c code signature: double gsl_sf_bessel_i1_scaled(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_K1_scaled(x[, ret])

Wrapper for gsl_sf_bessel_K1_scaled() c code signature: double gsl_sf_bessel_K1_scaled(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_K0(x[, ret])

Wrapper for gsl_sf_bessel_K0() c code signature: double gsl_sf_bessel_K0(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_i0_scaled(x[, ret])

Wrapper for gsl_sf_bessel_i0_scaled() c code signature: double gsl_sf_bessel_i0_scaled(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_k0_scaled(x[, ret])

Wrapper for gsl_sf_bessel_k0_scaled() c code signature: double gsl_sf_bessel_k0_scaled(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_J0_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_J0_e() c code signature: int gsl_sf_bessel_J0_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_Y0_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_Y0_e() c code signature: int gsl_sf_bessel_Y0_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_Inu_scaled(nu, x[, ret])

Wrapper for gsl_sf_bessel_Inu_scaled() c code signature: double gsl_sf_bessel_Inu_scaled( double nu, double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • nu (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_bessel_i2_scaled(x[, ret])

Wrapper for gsl_sf_bessel_i2_scaled() c code signature: double gsl_sf_bessel_i2_scaled(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_I1_scaled_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_I1_scaled_e() c code signature: int gsl_sf_bessel_I1_scaled_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_lnKnu_e(nu, x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_lnKnu_e() c code signature: int gsl_sf_bessel_lnKnu_e(const double nu, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • nu (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_bessel_j1_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_j1_e() c code signature: int gsl_sf_bessel_j1_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_Knu_scaled(nu, x[, ret])

Wrapper for gsl_sf_bessel_Knu_scaled() c code signature: double gsl_sf_bessel_Knu_scaled(const double nu, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • nu (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_bessel_i1_scaled_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_i1_scaled_e() c code signature: int gsl_sf_bessel_i1_scaled_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_j1(x[, ret])

Wrapper for gsl_sf_bessel_j1() c code signature: double gsl_sf_bessel_j1(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_Knu_e(nu, x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_Knu_e() c code signature: int gsl_sf_bessel_Knu_e(const double nu, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • nu (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_bessel_I1_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_I1_e() c code signature: int gsl_sf_bessel_I1_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_il_scaled_e(l, x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_il_scaled_e() c code signature: int gsl_sf_bessel_il_scaled_e(const int l, double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rl__Ord

Parameters:
  • l (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_bessel_Inu_e(nu, x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_Inu_e() c code signature: int gsl_sf_bessel_Inu_e( double nu, double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • nu (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_bessel_Y1_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_Y1_e() c code signature: int gsl_sf_bessel_Y1_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_lnKnu(nu, x[, ret])

Wrapper for gsl_sf_bessel_lnKnu() c code signature: double gsl_sf_bessel_lnKnu(const double nu, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • nu (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_bessel_Jnu(nu, x[, ret])

Wrapper for gsl_sf_bessel_Jnu() c code signature: double gsl_sf_bessel_Jnu(const double nu, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • nu (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_bessel_K1(x[, ret])

Wrapper for gsl_sf_bessel_K1() c code signature: double gsl_sf_bessel_K1(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_Kn_scaled(n, x[, ret])

Wrapper for gsl_sf_bessel_Kn_scaled() c code signature: double gsl_sf_bessel_Kn_scaled(const int n, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rd__O

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_bessel_y0(x[, ret])

Wrapper for gsl_sf_bessel_y0() c code signature: double gsl_sf_bessel_y0(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_I1(x[, ret])

Wrapper for gsl_sf_bessel_I1() c code signature: double gsl_sf_bessel_I1(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_zero_Jnu(nu, s[, ret])

Wrapper for gsl_sf_bessel_zero_Jnu() c code signature: double gsl_sf_bessel_zero_Jnu( double nu, unsigned int s) Wrapped by ufunc PyGSL_sf_ufunc_Id_ui__Rd__O

Parameters:
  • nu (double) – positional argument 0

  • s (unsigned int) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_bessel_i2_scaled_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_i2_scaled_e() c code signature: int gsl_sf_bessel_i2_scaled_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_y1(x[, ret])

Wrapper for gsl_sf_bessel_y1() c code signature: double gsl_sf_bessel_y1(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_Jn_e(n, x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_Jn_e() c code signature: int gsl_sf_bessel_Jn_e( int n, double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rl__Ord

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_bessel_Yn_e(n, x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_Yn_e() c code signature: int gsl_sf_bessel_Yn_e( int n, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rl__Ord

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_bessel_jl(l, x[, ret])

Wrapper for gsl_sf_bessel_jl() c code signature: double gsl_sf_bessel_jl(const int l, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rd__O

Parameters:
  • l (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_bessel_K1_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_K1_e() c code signature: int gsl_sf_bessel_K1_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_Inu(nu, x[, ret])

Wrapper for gsl_sf_bessel_Inu() c code signature: double gsl_sf_bessel_Inu( double nu, double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • nu (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_bessel_zero_J1(s[, ret])

Wrapper for gsl_sf_bessel_zero_J1() c code signature: double gsl_sf_bessel_zero_J1( unsigned int s) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rd__O

Parameters:
  • s (unsigned int) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_Y1(x[, ret])

Wrapper for gsl_sf_bessel_Y1() c code signature: double gsl_sf_bessel_Y1(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_y1_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_y1_e() c code signature: int gsl_sf_bessel_y1_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_y2(x[, ret])

Wrapper for gsl_sf_bessel_y2() c code signature: double gsl_sf_bessel_y2(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_Knu_scaled_e10_e(nu, x[, ret, result])

Wrapper for gsl_sf_bessel_Knu_scaled_e10_e() c code signature: int gsl_sf_bessel_Knu_scaled_e10_e(const double nu, const double x, gsl_sf_result_e10* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Oerd

Parameters:
  • nu (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result (gsl_sf_result_e10) – positional argument 3

Return type:

tuple(:param int ret: positional argument 2, :param gsl_sf_result_e10 result: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_I0(x[, ret])

Wrapper for gsl_sf_bessel_I0() c code signature: double gsl_sf_bessel_I0(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_yl_e(l, x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_yl_e() c code signature: int gsl_sf_bessel_yl_e( int l, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rl__Ord

Parameters:
  • l (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_bessel_j0_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_j0_e() c code signature: int gsl_sf_bessel_j0_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_zero_J0_e(s[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_zero_J0_e() c code signature: int gsl_sf_bessel_zero_J0_e( unsigned int s, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rl__Ord

Parameters:
  • s (unsigned int) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_I1_scaled(x[, ret])

Wrapper for gsl_sf_bessel_I1_scaled() c code signature: double gsl_sf_bessel_I1_scaled(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_Knu(nu, x[, ret])

Wrapper for gsl_sf_bessel_Knu() c code signature: double gsl_sf_bessel_Knu(const double nu, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • nu (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_bessel_k1_scaled(x[, ret])

Wrapper for gsl_sf_bessel_k1_scaled() c code signature: double gsl_sf_bessel_k1_scaled(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_J1(x[, ret])

Wrapper for gsl_sf_bessel_J1() c code signature: double gsl_sf_bessel_J1(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_k2_scaled_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_k2_scaled_e() c code signature: int gsl_sf_bessel_k2_scaled_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_Jnu_e(nu, x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_Jnu_e() c code signature: int gsl_sf_bessel_Jnu_e(const double nu, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • nu (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_bessel_y2_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_y2_e() c code signature: int gsl_sf_bessel_y2_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_k2_scaled(x[, ret])

Wrapper for gsl_sf_bessel_k2_scaled() c code signature: double gsl_sf_bessel_k2_scaled(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_kl_scaled(l, x[, ret])

Wrapper for gsl_sf_bessel_kl_scaled() c code signature: double gsl_sf_bessel_kl_scaled(const int l, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rd__O

Parameters:
  • l (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_bessel_Kn_scaled_e(n, x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_Kn_scaled_e() c code signature: int gsl_sf_bessel_Kn_scaled_e( int n, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rl__Ord

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_bessel_zero_Jnu_e(nu, s[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_zero_Jnu_e() c code signature: int gsl_sf_bessel_zero_Jnu_e( double nu, unsigned int s, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_ui__Rl__Ord

Parameters:
  • nu (double) – positional argument 0

  • s (unsigned int) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_bessel_In_scaled(n, x[, ret])

Wrapper for gsl_sf_bessel_In_scaled() c code signature: double gsl_sf_bessel_In_scaled(const int n, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rd__O

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_bessel_I0_scaled_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_I0_scaled_e() c code signature: int gsl_sf_bessel_I0_scaled_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_Y0(x[, ret])

Wrapper for gsl_sf_bessel_Y0() c code signature: double gsl_sf_bessel_Y0(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_il_scaled(l, x[, ret])

Wrapper for gsl_sf_bessel_il_scaled() c code signature: double gsl_sf_bessel_il_scaled(const int l, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rd__O

Parameters:
  • l (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_bessel_Ynu(nu, x[, ret])

Wrapper for gsl_sf_bessel_Ynu() c code signature: double gsl_sf_bessel_Ynu(const double nu, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • nu (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_bessel_Inu_scaled_e(nu, x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_Inu_scaled_e() c code signature: int gsl_sf_bessel_Inu_scaled_e( double nu, double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • nu (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_bessel_Knu_scaled_e(nu, x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_Knu_scaled_e() c code signature: int gsl_sf_bessel_Knu_scaled_e(const double nu, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • nu (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_bessel_Ynu_e(nu, x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_Ynu_e() c code signature: int gsl_sf_bessel_Ynu_e( double nu, double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • nu (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_bessel_j2_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_j2_e() c code signature: int gsl_sf_bessel_j2_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_zero_J1_e(s[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_zero_J1_e() c code signature: int gsl_sf_bessel_zero_J1_e( unsigned int s, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rl__Ord

Parameters:
  • s (unsigned int) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_Kn_e(n, x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_Kn_e() c code signature: int gsl_sf_bessel_Kn_e(const int n, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rl__Ord

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_bessel_Jn(n, x[, ret])

Wrapper for gsl_sf_bessel_Jn() c code signature: double gsl_sf_bessel_Jn(const int n, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rd__O

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_bessel_k0_scaled_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_k0_scaled_e() c code signature: int gsl_sf_bessel_k0_scaled_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_I0_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_I0_e() c code signature: int gsl_sf_bessel_I0_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_yl(l, x[, ret])

Wrapper for gsl_sf_bessel_yl() c code signature: double gsl_sf_bessel_yl(const int l, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rd__O

Parameters:
  • l (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_bessel_j0(x[, ret])

Wrapper for gsl_sf_bessel_j0() c code signature: double gsl_sf_bessel_j0(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_Yn(n, x[, ret])

Wrapper for gsl_sf_bessel_Yn() c code signature: double gsl_sf_bessel_Yn(const int n, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rd__O

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_bessel_j2(x[, ret])

Wrapper for gsl_sf_bessel_j2() c code signature: double gsl_sf_bessel_j2(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_y0_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_y0_e() c code signature: int gsl_sf_bessel_y0_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_In_scaled_e(n, x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_In_scaled_e() c code signature: int gsl_sf_bessel_In_scaled_e( int n, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rl__Ord

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_bessel_K0_scaled_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_K0_scaled_e() c code signature: int gsl_sf_bessel_K0_scaled_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_In_e(n, x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_In_e() c code signature: int gsl_sf_bessel_In_e(const int n, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rl__Ord

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_bessel_K1_scaled_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_K1_scaled_e() c code signature: int gsl_sf_bessel_K1_scaled_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_jl_e(l, x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_jl_e() c code signature: int gsl_sf_bessel_jl_e(const int l, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rl__Ord

Parameters:
  • l (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_bessel_J1_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_J1_e() c code signature: int gsl_sf_bessel_J1_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_K0_scaled(x[, ret])

Wrapper for gsl_sf_bessel_K0_scaled() c code signature: double gsl_sf_bessel_K0_scaled(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_kl_scaled_e(l, x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_kl_scaled_e() c code signature: int gsl_sf_bessel_kl_scaled_e( int l, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rl__Ord

Parameters:
  • l (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_bessel_K0_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_K0_e() c code signature: int gsl_sf_bessel_K0_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_J0(x[, ret])

Wrapper for gsl_sf_bessel_J0() c code signature: double gsl_sf_bessel_J0(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_k1_scaled_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_bessel_k1_scaled_e() c code signature: int gsl_sf_bessel_k1_scaled_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_bessel_I0_scaled(x[, ret])

Wrapper for gsl_sf_bessel_I0_scaled() c code signature: double gsl_sf_bessel_I0_scaled(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_bessel_In(n, x[, ret])

Wrapper for gsl_sf_bessel_In() c code signature: double gsl_sf_bessel_In(const int n, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rd__O

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_bessel_zero_J0(s[, ret])

Wrapper for gsl_sf_bessel_zero_J0() c code signature: double gsl_sf_bessel_zero_J0( unsigned int s) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rd__O

Parameters:
  • s (unsigned int) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

Clausen Functions

Coulomb Functions

pygsl.math.sf_coulomb_CL_e(L, eta[, ret, result.val, result.err])

Wrapper for gsl_sf_coulomb_CL_e() c code signature: int gsl_sf_coulomb_CL_e( double L, double eta, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • L (double) – positional argument 0

  • eta (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_coulomb_wave_FG_e(eta, x, lam_F, k_lam_G[, ret, exp_G, exp_F, Gp.val, Gp.err, G.val, G.err, Fp.val, Fp.err, F.val, F.err])

Wrapper for gsl_sf_coulomb_wave_FG_e() c code signature: int gsl_sf_coulomb_wave_FG_e(const double eta, const double x, const double lam_F, const int k_lam_G, gsl_sf_result* F, gsl_sf_result* Fp, gsl_sf_result* G, gsl_sf_result* Gp, double* exp_F, double* exp_G) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_l__Rl__Od_d_rd_rd_rd_rd

Parameters:
  • eta (double) – positional argument 0

  • x (double) – positional argument 1

  • lam_F (double) – positional argument 2

  • k_lam_G (int) – positional argument 3

  • ret (int) – positional argument 4

  • exp_G (double) – positional argument 5

  • exp_F (double) – positional argument 6

  • Gp.val (double) – positional argument 7

  • Gp.err (double) – positional argument 8

  • G.val (double) – positional argument 9

  • G.err (double) – positional argument 10

  • Fp.val (double) – positional argument 11

  • Fp.err (double) – positional argument 12

  • F.val (double) – positional argument 13

  • F.err (double) – positional argument 14

Return type:

tuple(:param int ret: positional argument 4, :param double exp_G: positional argument 5, :param double exp_F: positional argument 6, :param double Gp.val: positional argument 7, :param double Gp.err: positional argument 8, :param double G.val: positional argument 9, :param double G.err: positional argument 10, :param double Fp.val: positional argument 11, :param double Fp.err: positional argument 12, :param double F.val: positional argument 13, :param double F.err: positional argument 14)

Returns:

result

Coupling Functions

pygsl.math.sf_coupling_6j(two_ja, two_jb, two_jc, two_jd, two_je, two_jf[, ret])

Wrapper for gsl_sf_coupling_6j() c code signature: double gsl_sf_coupling_6j( int two_ja, int two_jb, int two_jc, int two_jd, int two_je, int two_jf) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_l_l_l_l__Rd__O

Parameters:
  • two_ja (int) – positional argument 0

  • two_jb (int) – positional argument 1

  • two_jc (int) – positional argument 2

  • two_jd (int) – positional argument 3

  • two_je (int) – positional argument 4

  • two_jf (int) – positional argument 5

  • ret (double) – positional argument 6

Return type:

double

Returns:

result

pygsl.math.sf_coupling_9j(two_ja, two_jb, two_jc, two_jd, two_je, two_jf, two_jg, two_jh, two_ji[, ret])

Wrapper for gsl_sf_coupling_9j() c code signature: double gsl_sf_coupling_9j( int two_ja, int two_jb, int two_jc, int two_jd, int two_je, int two_jf, int two_jg, int two_jh, int two_ji) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_l_l_l_l_l_l_l__Rd__O

Parameters:
  • two_ja (int) – positional argument 0

  • two_jb (int) – positional argument 1

  • two_jc (int) – positional argument 2

  • two_jd (int) – positional argument 3

  • two_je (int) – positional argument 4

  • two_jf (int) – positional argument 5

  • two_jg (int) – positional argument 6

  • two_jh (int) – positional argument 7

  • two_ji (int) – positional argument 8

  • ret (double) – positional argument 9

Return type:

double

Returns:

result

pygsl.math.sf_coupling_6j_e(two_ja, two_jb, two_jc, two_jd, two_je, two_jf[, ret, result.val, result.err])

Wrapper for gsl_sf_coupling_6j_e() c code signature: int gsl_sf_coupling_6j_e( int two_ja, int two_jb, int two_jc, int two_jd, int two_je, int two_jf, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_l_l_l_l__Rl__Ord

Parameters:
  • two_ja (int) – positional argument 0

  • two_jb (int) – positional argument 1

  • two_jc (int) – positional argument 2

  • two_jd (int) – positional argument 3

  • two_je (int) – positional argument 4

  • two_jf (int) – positional argument 5

  • ret (int) – positional argument 6

  • result.val (double) – positional argument 7

  • result.err (double) – positional argument 8

Return type:

tuple(:param int ret: positional argument 6, :param double result.val: positional argument 7, :param double result.err: positional argument 8)

Returns:

result

pygsl.math.sf_coupling_RacahW(two_ja, two_jb, two_jc, two_jd, two_je, two_jf[, ret])

Wrapper for gsl_sf_coupling_RacahW() c code signature: double gsl_sf_coupling_RacahW( int two_ja, int two_jb, int two_jc, int two_jd, int two_je, int two_jf) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_l_l_l_l__Rd__O

Parameters:
  • two_ja (int) – positional argument 0

  • two_jb (int) – positional argument 1

  • two_jc (int) – positional argument 2

  • two_jd (int) – positional argument 3

  • two_je (int) – positional argument 4

  • two_jf (int) – positional argument 5

  • ret (double) – positional argument 6

Return type:

double

Returns:

result

pygsl.math.sf_coupling_9j_e(two_ja, two_jb, two_jc, two_jd, two_je, two_jf, two_jg, two_jh, two_ji[, ret, result.val, result.err])

Wrapper for gsl_sf_coupling_9j_e() c code signature: int gsl_sf_coupling_9j_e( int two_ja, int two_jb, int two_jc, int two_jd, int two_je, int two_jf, int two_jg, int two_jh, int two_ji, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_l_l_l_l_l_l_l__Rl__Ord

Parameters:
  • two_ja (int) – positional argument 0

  • two_jb (int) – positional argument 1

  • two_jc (int) – positional argument 2

  • two_jd (int) – positional argument 3

  • two_je (int) – positional argument 4

  • two_jf (int) – positional argument 5

  • two_jg (int) – positional argument 6

  • two_jh (int) – positional argument 7

  • two_ji (int) – positional argument 8

  • ret (int) – positional argument 9

  • result.val (double) – positional argument 10

  • result.err (double) – positional argument 11

Return type:

tuple(:param int ret: positional argument 9, :param double result.val: positional argument 10, :param double result.err: positional argument 11)

Returns:

result

pygsl.math.sf_coupling_RacahW_e(two_ja, two_jb, two_jc, two_jd, two_je, two_jf[, ret, result.val, result.err])

Wrapper for gsl_sf_coupling_RacahW_e() c code signature: int gsl_sf_coupling_RacahW_e( int two_ja, int two_jb, int two_jc, int two_jd, int two_je, int two_jf, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_l_l_l_l__Rl__Ord

Parameters:
  • two_ja (int) – positional argument 0

  • two_jb (int) – positional argument 1

  • two_jc (int) – positional argument 2

  • two_jd (int) – positional argument 3

  • two_je (int) – positional argument 4

  • two_jf (int) – positional argument 5

  • ret (int) – positional argument 6

  • result.val (double) – positional argument 7

  • result.err (double) – positional argument 8

Return type:

tuple(:param int ret: positional argument 6, :param double result.val: positional argument 7, :param double result.err: positional argument 8)

Returns:

result

pygsl.math.sf_coupling_3j(two_ja, two_jb, two_jc, two_ma, two_mb, two_mc[, ret])

Wrapper for gsl_sf_coupling_3j() c code signature: double gsl_sf_coupling_3j( int two_ja, int two_jb, int two_jc, int two_ma, int two_mb, int two_mc) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_l_l_l_l__Rd__O

Parameters:
  • two_ja (int) – positional argument 0

  • two_jb (int) – positional argument 1

  • two_jc (int) – positional argument 2

  • two_ma (int) – positional argument 3

  • two_mb (int) – positional argument 4

  • two_mc (int) – positional argument 5

  • ret (double) – positional argument 6

Return type:

double

Returns:

result

pygsl.math.sf_coupling_3j_e(two_ja, two_jb, two_jc, two_ma, two_mb, two_mc[, ret, result.val, result.err])

Wrapper for gsl_sf_coupling_3j_e() c code signature: int gsl_sf_coupling_3j_e( int two_ja, int two_jb, int two_jc, int two_ma, int two_mb, int two_mc, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_l_l_l_l__Rl__Ord

Parameters:
  • two_ja (int) – positional argument 0

  • two_jb (int) – positional argument 1

  • two_jc (int) – positional argument 2

  • two_ma (int) – positional argument 3

  • two_mb (int) – positional argument 4

  • two_mc (int) – positional argument 5

  • ret (int) – positional argument 6

  • result.val (double) – positional argument 7

  • result.err (double) – positional argument 8

Return type:

tuple(:param int ret: positional argument 6, :param double result.val: positional argument 7, :param double result.err: positional argument 8)

Returns:

result

Dawson Function

pygsl.math.sf_dawson_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_dawson_e() c code signature: int gsl_sf_dawson_e( double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_dawson(x[, ret])

Wrapper for gsl_sf_dawson() c code signature: double gsl_sf_dawson( double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

Debye Functions

pygsl.math.sf_debye_5_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_debye_5_e() c code signature: int gsl_sf_debye_5_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_debye_1(x[, ret])

Wrapper for gsl_sf_debye_1() c code signature: double gsl_sf_debye_1(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_debye_6(x[, ret])

Wrapper for gsl_sf_debye_6() c code signature: double gsl_sf_debye_6(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_debye_3_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_debye_3_e() c code signature: int gsl_sf_debye_3_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_debye_4(x[, ret])

Wrapper for gsl_sf_debye_4() c code signature: double gsl_sf_debye_4(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_debye_3(x[, ret])

Wrapper for gsl_sf_debye_3() c code signature: double gsl_sf_debye_3(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_debye_1_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_debye_1_e() c code signature: int gsl_sf_debye_1_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_debye_4_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_debye_4_e() c code signature: int gsl_sf_debye_4_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_debye_5(x[, ret])

Wrapper for gsl_sf_debye_5() c code signature: double gsl_sf_debye_5(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_debye_6_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_debye_6_e() c code signature: int gsl_sf_debye_6_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_debye_2_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_debye_2_e() c code signature: int gsl_sf_debye_2_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_debye_2(x[, ret])

Wrapper for gsl_sf_debye_2() c code signature: double gsl_sf_debye_2(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

Dilogarithm

pygsl.math.sf_complex_dilog_xy_e(x, y[, ret, result_im.val, result_im.err, result_re.val, result_re.err])

Wrapper for gsl_sf_complex_dilog_xy_e() c code signature: int gsl_sf_complex_dilog_xy_e(const double x, const double y, gsl_sf_result* result_re, gsl_sf_result* result_im) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord_rd

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • ret (int) – positional argument 2

  • result_im.val (double) – positional argument 3

  • result_im.err (double) – positional argument 4

  • result_re.val (double) – positional argument 5

  • result_re.err (double) – positional argument 6

Return type:

tuple(:param int ret: positional argument 2, :param double result_im.val: positional argument 3, :param double result_im.err: positional argument 4, :param double result_re.val: positional argument 5, :param double result_re.err: positional argument 6)

Returns:

result

pygsl.math.sf_complex_spence_xy_e(x, y[, ret, imag_sp.val, imag_sp.err, real_sp.val, real_sp.err])

Wrapper for gsl_sf_complex_spence_xy_e() c code signature: int gsl_sf_complex_spence_xy_e(const double x, const double y, gsl_sf_result* real_sp, gsl_sf_result* imag_sp) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord_rd

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • ret (int) – positional argument 2

  • imag_sp.val (double) – positional argument 3

  • imag_sp.err (double) – positional argument 4

  • real_sp.val (double) – positional argument 5

  • real_sp.err (double) – positional argument 6

Return type:

tuple(:param int ret: positional argument 2, :param double imag_sp.val: positional argument 3, :param double imag_sp.err: positional argument 4, :param double real_sp.val: positional argument 5, :param double real_sp.err: positional argument 6)

Returns:

result

pygsl.math.sf_dilog_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_dilog_e() c code signature: int gsl_sf_dilog_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_dilog(x[, ret])

Wrapper for gsl_sf_dilog() c code signature: double gsl_sf_dilog(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

Elementary Operations

pygsl.math.sf_multiply(x, y[, ret])

Wrapper for gsl_sf_multiply() c code signature: double gsl_sf_multiply(const double x, const double y) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_multiply_e(x, y[, ret, result.val, result.err])

Wrapper for gsl_sf_multiply_e() c code signature: int gsl_sf_multiply_e(const double x, const double y, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_multiply_err_e(x, dx, y, dy[, ret, result.val, result.err])

Wrapper for gsl_sf_multiply_err_e() c code signature: int gsl_sf_multiply_err_e(const double x, const double dx, const double y, const double dy, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_d__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • dx (double) – positional argument 1

  • y (double) – positional argument 2

  • dy (double) – positional argument 3

  • ret (int) – positional argument 4

  • result.val (double) – positional argument 5

  • result.err (double) – positional argument 6

Return type:

tuple(:param int ret: positional argument 4, :param double result.val: positional argument 5, :param double result.err: positional argument 6)

Returns:

result

Ellipitcal Integrals

pygsl.math.sf_ellint_Dcomp_e(k, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_ellint_Dcomp_e() c code signature: int gsl_sf_ellint_Dcomp_e( double k, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rl__Ord

Parameters:
  • k (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_ellint_Dcomp(k, mode[, ret])

Wrapper for gsl_sf_ellint_Dcomp() c code signature: double gsl_sf_ellint_Dcomp( double k, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rd__O

Parameters:
  • k (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_ellint_Pcomp_e(k, n, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_ellint_Pcomp_e() c code signature: int gsl_sf_ellint_Pcomp_e( double k, double n, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_m__Rl__Ord

Parameters:
  • k (double) – positional argument 0

  • n (double) – positional argument 1

  • mode (gsl_mode_t) – positional argument 2

  • ret (int) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

pygsl.math.sf_ellint_RJ(x, y, z, p, mode[, ret])

Wrapper for gsl_sf_ellint_RJ() c code signature: double gsl_sf_ellint_RJ( double x, double y, double z, double p, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_d_m__Rd__O

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • z (double) – positional argument 2

  • p (double) – positional argument 3

  • mode (gsl_mode_t) – positional argument 4

  • ret (double) – positional argument 5

Return type:

double

Returns:

result

pygsl.math.sf_ellint_P(phi, k, n, mode[, ret])

Wrapper for gsl_sf_ellint_P() c code signature: double gsl_sf_ellint_P( double phi, double k, double n, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_m__Rd__O

Parameters:
  • phi (double) – positional argument 0

  • k (double) – positional argument 1

  • n (double) – positional argument 2

  • mode (gsl_mode_t) – positional argument 3

  • ret (double) – positional argument 4

Return type:

double

Returns:

result

pygsl.math.sf_ellint_Ecomp_e(k, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_ellint_Ecomp_e() c code signature: int gsl_sf_ellint_Ecomp_e( double k, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rl__Ord

Parameters:
  • k (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_ellint_RF_e(x, y, z, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_ellint_RF_e() c code signature: int gsl_sf_ellint_RF_e( double x, double y, double z, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_m__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • z (double) – positional argument 2

  • mode (gsl_mode_t) – positional argument 3

  • ret (int) – positional argument 4

  • result.val (double) – positional argument 5

  • result.err (double) – positional argument 6

Return type:

tuple(:param int ret: positional argument 4, :param double result.val: positional argument 5, :param double result.err: positional argument 6)

Returns:

result

pygsl.math.sf_ellint_E_e(phi, k, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_ellint_E_e() c code signature: int gsl_sf_ellint_E_e( double phi, double k, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_m__Rl__Ord

Parameters:
  • phi (double) – positional argument 0

  • k (double) – positional argument 1

  • mode (gsl_mode_t) – positional argument 2

  • ret (int) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

pygsl.math.sf_ellint_RC_e(x, y, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_ellint_RC_e() c code signature: int gsl_sf_ellint_RC_e( double x, double y, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_m__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • mode (gsl_mode_t) – positional argument 2

  • ret (int) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

pygsl.math.sf_ellint_Kcomp_e(k, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_ellint_Kcomp_e() c code signature: int gsl_sf_ellint_Kcomp_e( double k, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rl__Ord

Parameters:
  • k (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_ellint_Kcomp(k, mode[, ret])

Wrapper for gsl_sf_ellint_Kcomp() c code signature: double gsl_sf_ellint_Kcomp( double k, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rd__O

Parameters:
  • k (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_ellint_RD_e(x, y, z, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_ellint_RD_e() c code signature: int gsl_sf_ellint_RD_e( double x, double y, double z, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_m__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • z (double) – positional argument 2

  • mode (gsl_mode_t) – positional argument 3

  • ret (int) – positional argument 4

  • result.val (double) – positional argument 5

  • result.err (double) – positional argument 6

Return type:

tuple(:param int ret: positional argument 4, :param double result.val: positional argument 5, :param double result.err: positional argument 6)

Returns:

result

pygsl.math.sf_ellint_F(phi, k, mode[, ret])

Wrapper for gsl_sf_ellint_F() c code signature: double gsl_sf_ellint_F( double phi, double k, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_m__Rd__O

Parameters:
  • phi (double) – positional argument 0

  • k (double) – positional argument 1

  • mode (gsl_mode_t) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

pygsl.math.sf_ellint_D_e(phi, k, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_ellint_D_e() c code signature: int gsl_sf_ellint_D_e( double phi, double k, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_m__Rl__Ord

Parameters:
  • phi (double) – positional argument 0

  • k (double) – positional argument 1

  • mode (gsl_mode_t) – positional argument 2

  • ret (int) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

pygsl.math.sf_ellint_D(phi, k, mode[, ret])

Wrapper for gsl_sf_ellint_D() c code signature: double gsl_sf_ellint_D( double phi, double k, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_m__Rd__O

Parameters:
  • phi (double) – positional argument 0

  • k (double) – positional argument 1

  • mode (gsl_mode_t) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

pygsl.math.sf_ellint_E(phi, k, mode[, ret])

Wrapper for gsl_sf_ellint_E() c code signature: double gsl_sf_ellint_E( double phi, double k, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_m__Rd__O

Parameters:
  • phi (double) – positional argument 0

  • k (double) – positional argument 1

  • mode (gsl_mode_t) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

pygsl.math.sf_ellint_RJ_e(x, y, z, p, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_ellint_RJ_e() c code signature: int gsl_sf_ellint_RJ_e( double x, double y, double z, double p, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_d_m__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • z (double) – positional argument 2

  • p (double) – positional argument 3

  • mode (gsl_mode_t) – positional argument 4

  • ret (int) – positional argument 5

  • result.val (double) – positional argument 6

  • result.err (double) – positional argument 7

Return type:

tuple(:param int ret: positional argument 5, :param double result.val: positional argument 6, :param double result.err: positional argument 7)

Returns:

result

pygsl.math.sf_ellint_RF(x, y, z, mode[, ret])

Wrapper for gsl_sf_ellint_RF() c code signature: double gsl_sf_ellint_RF( double x, double y, double z, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_m__Rd__O

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • z (double) – positional argument 2

  • mode (gsl_mode_t) – positional argument 3

  • ret (double) – positional argument 4

Return type:

double

Returns:

result

pygsl.math.sf_ellint_Pcomp(k, n, mode[, ret])

Wrapper for gsl_sf_ellint_Pcomp() c code signature: double gsl_sf_ellint_Pcomp( double k, double n, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_m__Rd__O

Parameters:
  • k (double) – positional argument 0

  • n (double) – positional argument 1

  • mode (gsl_mode_t) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

pygsl.math.sf_ellint_Ecomp(k, mode[, ret])

Wrapper for gsl_sf_ellint_Ecomp() c code signature: double gsl_sf_ellint_Ecomp( double k, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_m__Rd__O

Parameters:
  • k (double) – positional argument 0

  • mode (gsl_mode_t) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_ellint_RD(x, y, z, mode[, ret])

Wrapper for gsl_sf_ellint_RD() c code signature: double gsl_sf_ellint_RD( double x, double y, double z, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_m__Rd__O

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • z (double) – positional argument 2

  • mode (gsl_mode_t) – positional argument 3

  • ret (double) – positional argument 4

Return type:

double

Returns:

result

pygsl.math.sf_ellint_F_e(phi, k, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_ellint_F_e() c code signature: int gsl_sf_ellint_F_e( double phi, double k, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_m__Rl__Ord

Parameters:
  • phi (double) – positional argument 0

  • k (double) – positional argument 1

  • mode (gsl_mode_t) – positional argument 2

  • ret (int) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

pygsl.math.sf_ellint_P_e(phi, k, n, mode[, ret, result.val, result.err])

Wrapper for gsl_sf_ellint_P_e() c code signature: int gsl_sf_ellint_P_e( double phi, double k, double n, gsl_mode_t mode, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_m__Rl__Ord

Parameters:
  • phi (double) – positional argument 0

  • k (double) – positional argument 1

  • n (double) – positional argument 2

  • mode (gsl_mode_t) – positional argument 3

  • ret (int) – positional argument 4

  • result.val (double) – positional argument 5

  • result.err (double) – positional argument 6

Return type:

tuple(:param int ret: positional argument 4, :param double result.val: positional argument 5, :param double result.err: positional argument 6)

Returns:

result

pygsl.math.sf_ellint_RC(x, y, mode[, ret])

Wrapper for gsl_sf_ellint_RC() c code signature: double gsl_sf_ellint_RC( double x, double y, gsl_mode_t mode) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_m__Rd__O

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • mode (gsl_mode_t) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

pygsl.math.sf_elljac_e(u, m[, ret, dn, cn, sn])

Wrapper for gsl_sf_elljac_e() c code signature: int gsl_sf_elljac_e( double u, double m, double* sn, double* cn, double* dn) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Od_d_d

Parameters:
  • u (double) – positional argument 0

  • m (double) – positional argument 1

  • ret (int) – positional argument 2

  • dn (double) – positional argument 3

  • cn (double) – positional argument 4

  • sn (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 2, :param double dn: positional argument 3, :param double cn: positional argument 4, :param double sn: positional argument 5)

Returns:

result

Error Functions

pygsl.math.sf_erfc_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_erfc_e() c code signature: int gsl_sf_erfc_e( double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_erf_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_erf_e() c code signature: int gsl_sf_erf_e( double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_erf_Z_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_erf_Z_e() c code signature: int gsl_sf_erf_Z_e( double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_erf_Q_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_erf_Q_e() c code signature: int gsl_sf_erf_Q_e( double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_erf_Z(x[, ret])

Wrapper for gsl_sf_erf_Z() c code signature: double gsl_sf_erf_Z( double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_erf_Q(x[, ret])

Wrapper for gsl_sf_erf_Q() c code signature: double gsl_sf_erf_Q( double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_erf(x[, ret])

Wrapper for gsl_sf_erf() c code signature: double gsl_sf_erf( double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_erfc(x[, ret])

Wrapper for gsl_sf_erfc() c code signature: double gsl_sf_erfc( double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_hazard(x[, ret])

Wrapper for gsl_sf_hazard() c code signature: double gsl_sf_hazard( double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_hazard_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_hazard_e() c code signature: int gsl_sf_hazard_e( double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

Exponential Functions and Integrals

pygsl.math.sf_Chi(x[, ret])

Wrapper for gsl_sf_Chi() c code signature: double gsl_sf_Chi(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_Chi_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_Chi_e() c code signature: int gsl_sf_Chi_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_Ci(x[, ret])

Wrapper for gsl_sf_Ci() c code signature: double gsl_sf_Ci(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_Ci_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_Ci_e() c code signature: int gsl_sf_Ci_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_Shi_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_Shi_e() c code signature: int gsl_sf_Shi_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_Shi(x[, ret])

Wrapper for gsl_sf_Shi() c code signature: double gsl_sf_Shi(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_Si_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_Si_e() c code signature: int gsl_sf_Si_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_Si(x[, ret])

Wrapper for gsl_sf_Si() c code signature: double gsl_sf_Si(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_atanint(x[, ret])

Wrapper for gsl_sf_atanint() c code signature: double gsl_sf_atanint(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_atanint_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_atanint_e() c code signature: int gsl_sf_atanint_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_exprel(x[, ret])

Wrapper for gsl_sf_exprel() c code signature: double gsl_sf_exprel(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_expm1_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_expm1_e() c code signature: int gsl_sf_expm1_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_exp_err_e(x, dx[, ret, result.val, result.err])

Wrapper for gsl_sf_exp_err_e() c code signature: int gsl_sf_exp_err_e(const double x, const double dx, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • dx (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_expint_En_e(n, x[, ret, result.val, result.err])

Wrapper for gsl_sf_expint_En_e() c code signature: int gsl_sf_expint_En_e(const int n, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rl__Ord

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_exp_mult_err_e(x, dx, y, dy[, ret, result.val, result.err])

Wrapper for gsl_sf_exp_mult_err_e() c code signature: int gsl_sf_exp_mult_err_e(const double x, const double dx, const double y, const double dy, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_d__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • dx (double) – positional argument 1

  • y (double) – positional argument 2

  • dy (double) – positional argument 3

  • ret (int) – positional argument 4

  • result.val (double) – positional argument 5

  • result.err (double) – positional argument 6

Return type:

tuple(:param int ret: positional argument 4, :param double result.val: positional argument 5, :param double result.err: positional argument 6)

Returns:

result

pygsl.math.sf_expint_Ei_scaled(x[, ret])

Wrapper for gsl_sf_expint_Ei_scaled() c code signature: double gsl_sf_expint_Ei_scaled(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_expint_E2(x[, ret])

Wrapper for gsl_sf_expint_E2() c code signature: double gsl_sf_expint_E2(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_exp_mult(x, y[, ret])

Wrapper for gsl_sf_exp_mult() c code signature: double gsl_sf_exp_mult(const double x, const double y) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_expint_E2_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_expint_E2_e() c code signature: int gsl_sf_expint_E2_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_expint_3_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_expint_3_e() c code signature: int gsl_sf_expint_3_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_exp(x[, ret])

Wrapper for gsl_sf_exp() c code signature: double gsl_sf_exp(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_exprel_2(x[, ret])

Wrapper for gsl_sf_exprel_2() c code signature: double gsl_sf_exprel_2(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_exp_mult_e(x, y[, ret, result.val, result.err])

Wrapper for gsl_sf_exp_mult_e() c code signature: int gsl_sf_exp_mult_e(const double x, const double y, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_expint_En_scaled(n, x[, ret])

Wrapper for gsl_sf_expint_En_scaled() c code signature: double gsl_sf_expint_En_scaled(const int n, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rd__O

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_exprel_n_e(n, x[, ret, result.val, result.err])

Wrapper for gsl_sf_exprel_n_e() c code signature: int gsl_sf_exprel_n_e(const int n, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rl__Ord

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_exprel_n_CF_e(n, x[, ret, result.val, result.err])

Wrapper for gsl_sf_exprel_n_CF_e() c code signature: int gsl_sf_exprel_n_CF_e(const double n, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • n (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_expint_En_scaled_e(n, x[, ret, result.val, result.err])

Wrapper for gsl_sf_expint_En_scaled_e() c code signature: int gsl_sf_expint_En_scaled_e(const int n, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rl__Ord

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_expint_E1(x[, ret])

Wrapper for gsl_sf_expint_E1() c code signature: double gsl_sf_expint_E1(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_expint_Ei(x[, ret])

Wrapper for gsl_sf_expint_Ei() c code signature: double gsl_sf_expint_Ei(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_exprel_n(n, x[, ret])

Wrapper for gsl_sf_exprel_n() c code signature: double gsl_sf_exprel_n(const int n, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rd__O

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_expint_E1_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_expint_E1_e() c code signature: int gsl_sf_expint_E1_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_exp_mult_e10_e(x, y[, ret, result])

Wrapper for gsl_sf_exp_mult_e10_e() c code signature: int gsl_sf_exp_mult_e10_e(const double x, const double y, gsl_sf_result_e10* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Oerd

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • ret (int) – positional argument 2

  • result (gsl_sf_result_e10) – positional argument 3

Return type:

tuple(:param int ret: positional argument 2, :param gsl_sf_result_e10 result: positional argument 3)

Returns:

result

pygsl.math.sf_exprel_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_exprel_e() c code signature: int gsl_sf_exprel_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_expint_E1_scaled_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_expint_E1_scaled_e() c code signature: int gsl_sf_expint_E1_scaled_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_expint_E2_scaled(x[, ret])

Wrapper for gsl_sf_expint_E2_scaled() c code signature: double gsl_sf_expint_E2_scaled(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_exp_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_exp_e() c code signature: int gsl_sf_exp_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_expint_E1_scaled(x[, ret])

Wrapper for gsl_sf_expint_E1_scaled() c code signature: double gsl_sf_expint_E1_scaled(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_expint_En(n, x[, ret])

Wrapper for gsl_sf_expint_En() c code signature: double gsl_sf_expint_En(const int n, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rd__O

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_exp_e10_e(x[, ret, result])

Wrapper for gsl_sf_exp_e10_e() c code signature: int gsl_sf_exp_e10_e(const double x, gsl_sf_result_e10* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Oerd

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result (gsl_sf_result_e10) – positional argument 2

Return type:

tuple(:param int ret: positional argument 1, :param gsl_sf_result_e10 result: positional argument 2)

Returns:

result

pygsl.math.sf_exp_err_e10_e(x, dx[, ret, result])

Wrapper for gsl_sf_exp_err_e10_e() c code signature: int gsl_sf_exp_err_e10_e(const double x, const double dx, gsl_sf_result_e10* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Oerd

Parameters:
  • x (double) – positional argument 0

  • dx (double) – positional argument 1

  • ret (int) – positional argument 2

  • result (gsl_sf_result_e10) – positional argument 3

Return type:

tuple(:param int ret: positional argument 2, :param gsl_sf_result_e10 result: positional argument 3)

Returns:

result

pygsl.math.sf_expint_Ei_scaled_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_expint_Ei_scaled_e() c code signature: int gsl_sf_expint_Ei_scaled_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_expm1(x[, ret])

Wrapper for gsl_sf_expm1() c code signature: double gsl_sf_expm1(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_expint_Ei_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_expint_Ei_e() c code signature: int gsl_sf_expint_Ei_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_expint_E2_scaled_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_expint_E2_scaled_e() c code signature: int gsl_sf_expint_E2_scaled_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_expint_3(x[, ret])

Wrapper for gsl_sf_expint_3() c code signature: double gsl_sf_expint_3( double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_exprel_2_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_exprel_2_e() c code signature: int gsl_sf_exprel_2_e( double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_exp_mult_err_e10_e(x, dx, y, dy[, ret, result])

Wrapper for gsl_sf_exp_mult_err_e10_e() c code signature: int gsl_sf_exp_mult_err_e10_e(const double x, const double dx, const double y, const double dy, gsl_sf_result_e10* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_d__Rl__Oerd

Parameters:
  • x (double) – positional argument 0

  • dx (double) – positional argument 1

  • y (double) – positional argument 2

  • dy (double) – positional argument 3

  • ret (int) – positional argument 4

  • result (gsl_sf_result_e10) – positional argument 5

Return type:

tuple(:param int ret: positional argument 4, :param gsl_sf_result_e10 result: positional argument 5)

Returns:

result

Fermi Dirac Functions

pygsl.math.sf_fermi_dirac_half_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_fermi_dirac_half_e() c code signature: int gsl_sf_fermi_dirac_half_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_fermi_dirac_2_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_fermi_dirac_2_e() c code signature: int gsl_sf_fermi_dirac_2_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_fermi_dirac_1_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_fermi_dirac_1_e() c code signature: int gsl_sf_fermi_dirac_1_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_fermi_dirac_int(j, x[, ret])

Wrapper for gsl_sf_fermi_dirac_int() c code signature: double gsl_sf_fermi_dirac_int(const int j, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rd__O

Parameters:
  • j (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_fermi_dirac_m1(x[, ret])

Wrapper for gsl_sf_fermi_dirac_m1() c code signature: double gsl_sf_fermi_dirac_m1(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_fermi_dirac_m1_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_fermi_dirac_m1_e() c code signature: int gsl_sf_fermi_dirac_m1_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_fermi_dirac_mhalf_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_fermi_dirac_mhalf_e() c code signature: int gsl_sf_fermi_dirac_mhalf_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_fermi_dirac_inc_0(x, b[, ret])

Wrapper for gsl_sf_fermi_dirac_inc_0() c code signature: double gsl_sf_fermi_dirac_inc_0(const double x, const double b) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • x (double) – positional argument 0

  • b (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_fermi_dirac_0_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_fermi_dirac_0_e() c code signature: int gsl_sf_fermi_dirac_0_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_fermi_dirac_0(x[, ret])

Wrapper for gsl_sf_fermi_dirac_0() c code signature: double gsl_sf_fermi_dirac_0(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_fermi_dirac_2(x[, ret])

Wrapper for gsl_sf_fermi_dirac_2() c code signature: double gsl_sf_fermi_dirac_2(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_fermi_dirac_1(x[, ret])

Wrapper for gsl_sf_fermi_dirac_1() c code signature: double gsl_sf_fermi_dirac_1(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_fermi_dirac_3half_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_fermi_dirac_3half_e() c code signature: int gsl_sf_fermi_dirac_3half_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_fermi_dirac_inc_0_e(x, b[, ret, result.val, result.err])

Wrapper for gsl_sf_fermi_dirac_inc_0_e() c code signature: int gsl_sf_fermi_dirac_inc_0_e(const double x, const double b, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • b (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_fermi_dirac_half(x[, ret])

Wrapper for gsl_sf_fermi_dirac_half() c code signature: double gsl_sf_fermi_dirac_half(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_fermi_dirac_mhalf(x[, ret])

Wrapper for gsl_sf_fermi_dirac_mhalf() c code signature: double gsl_sf_fermi_dirac_mhalf(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_fermi_dirac_int_e(j, x[, ret, result.val, result.err])

Wrapper for gsl_sf_fermi_dirac_int_e() c code signature: int gsl_sf_fermi_dirac_int_e(const int j, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rl__Ord

Parameters:
  • j (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_fermi_dirac_3half(x[, ret])

Wrapper for gsl_sf_fermi_dirac_3half() c code signature: double gsl_sf_fermi_dirac_3half(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

Gamma and Beta Functions

pygsl.math.sf_beta(a, b[, ret])

Wrapper for gsl_sf_beta() c code signature: double gsl_sf_beta(const double a, const double b) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • a (double) – positional argument 0

  • b (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_beta_e(a, b[, ret, result.val, result.err])

Wrapper for gsl_sf_beta_e() c code signature: int gsl_sf_beta_e(const double a, const double b, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • a (double) – positional argument 0

  • b (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_beta_inc_e(a, b, x[, ret, result.val, result.err])

Wrapper for gsl_sf_beta_inc_e() c code signature: int gsl_sf_beta_inc_e(const double a, const double b, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d__Rl__Ord

Parameters:
  • a (double) – positional argument 0

  • b (double) – positional argument 1

  • x (double) – positional argument 2

  • ret (int) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

pygsl.math.sf_beta_inc(a, b, x[, ret])

Wrapper for gsl_sf_beta_inc() c code signature: double gsl_sf_beta_inc(const double a, const double b, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d__Rd__O

Parameters:
  • a (double) – positional argument 0

  • b (double) – positional argument 1

  • x (double) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

pygsl.math.sf_choose(n, m[, ret])

Wrapper for gsl_sf_choose() c code signature: double gsl_sf_choose( unsigned int n, unsigned int m) Wrapped by ufunc PyGSL_sf_ufunc_Iui_ui__Rd__O

Parameters:
  • n (unsigned int) – positional argument 0

  • m (unsigned int) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_choose_e(n, m[, ret, result.val, result.err])

Wrapper for gsl_sf_choose_e() c code signature: int gsl_sf_choose_e( unsigned int n, unsigned int m, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Iui_ui__Rl__Ord

Parameters:
  • n (unsigned int) – positional argument 0

  • m (unsigned int) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_doublefact_e(n[, ret, result.val, result.err])

Wrapper for gsl_sf_doublefact_e() c code signature: int gsl_sf_doublefact_e(const unsigned int n, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rl__Ord

Parameters:
  • n (unsigned int) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_doublefact(n[, ret])

Wrapper for gsl_sf_doublefact() c code signature: double gsl_sf_doublefact(const unsigned int n) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rd__O

Parameters:
  • n (unsigned int) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_fact(n[, ret])

Wrapper for gsl_sf_fact() c code signature: double gsl_sf_fact(const unsigned int n) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rd__O

Parameters:
  • n (unsigned int) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_fact_e(n[, ret, result.val, result.err])

Wrapper for gsl_sf_fact_e() c code signature: int gsl_sf_fact_e(const unsigned int n, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rl__Ord

Parameters:
  • n (unsigned int) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_gamma_inc_P(a, x[, ret])

Wrapper for gsl_sf_gamma_inc_P() c code signature: double gsl_sf_gamma_inc_P(const double a, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_gammainv_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_gammainv_e() c code signature: int gsl_sf_gammainv_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_gamma_inc_Q(a, x[, ret])

Wrapper for gsl_sf_gamma_inc_Q() c code signature: double gsl_sf_gamma_inc_Q(const double a, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_gamma_inc_P_e(a, x[, ret, result.val, result.err])

Wrapper for gsl_sf_gamma_inc_P_e() c code signature: int gsl_sf_gamma_inc_P_e(const double a, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_gamma_inc_Q_e(a, x[, ret, result.val, result.err])

Wrapper for gsl_sf_gamma_inc_Q_e() c code signature: int gsl_sf_gamma_inc_Q_e(const double a, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_gamma_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_gamma_e() c code signature: int gsl_sf_gamma_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_gammastar(x[, ret])

Wrapper for gsl_sf_gammastar() c code signature: double gsl_sf_gammastar(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_gammastar_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_gammastar_e() c code signature: int gsl_sf_gammastar_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_gamma_inc_e(a, x[, ret, result.val, result.err])

Wrapper for gsl_sf_gamma_inc_e() c code signature: int gsl_sf_gamma_inc_e(const double a, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_gamma(x[, ret])

Wrapper for gsl_sf_gamma() c code signature: double gsl_sf_gamma(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_gammainv(x[, ret])

Wrapper for gsl_sf_gammainv() c code signature: double gsl_sf_gammainv(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_gamma_inc(a, x[, ret])

Wrapper for gsl_sf_gamma_inc() c code signature: double gsl_sf_gamma_inc(const double a, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_lnbeta_sgn_e(x, y[, ret, sgn, result.val, result.err])

Wrapper for gsl_sf_lnbeta_sgn_e() c code signature: int gsl_sf_lnbeta_sgn_e(const double x, const double y, gsl_sf_result* result, double* sgn) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Od_rd

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • ret (int) – positional argument 2

  • sgn (double) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 2, :param double sgn: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

pygsl.math.sf_lnbeta_e(a, b[, ret, result.val, result.err])

Wrapper for gsl_sf_lnbeta_e() c code signature: int gsl_sf_lnbeta_e(const double a, const double b, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • a (double) – positional argument 0

  • b (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_lnbeta(a, b[, ret])

Wrapper for gsl_sf_lnbeta() c code signature: double gsl_sf_lnbeta(const double a, const double b) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • a (double) – positional argument 0

  • b (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_lnchoose(n, m[, ret])

Wrapper for gsl_sf_lnchoose() c code signature: double gsl_sf_lnchoose( unsigned int n, unsigned int m) Wrapped by ufunc PyGSL_sf_ufunc_Iui_ui__Rd__O

Parameters:
  • n (unsigned int) – positional argument 0

  • m (unsigned int) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_lnchoose_e(n, m[, ret, result.val, result.err])

Wrapper for gsl_sf_lnchoose_e() c code signature: int gsl_sf_lnchoose_e( unsigned int n, unsigned int m, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Iui_ui__Rl__Ord

Parameters:
  • n (unsigned int) – positional argument 0

  • m (unsigned int) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_lndoublefact_e(n[, ret, result.val, result.err])

Wrapper for gsl_sf_lndoublefact_e() c code signature: int gsl_sf_lndoublefact_e(const unsigned int n, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rl__Ord

Parameters:
  • n (unsigned int) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_lndoublefact(n[, ret])

Wrapper for gsl_sf_lndoublefact() c code signature: double gsl_sf_lndoublefact(const unsigned int n) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rd__O

Parameters:
  • n (unsigned int) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_lnfact(n[, ret])

Wrapper for gsl_sf_lnfact() c code signature: double gsl_sf_lnfact(const unsigned int n) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rd__O

Parameters:
  • n (unsigned int) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_lnfact_e(n[, ret, result.val, result.err])

Wrapper for gsl_sf_lnfact_e() c code signature: int gsl_sf_lnfact_e(const unsigned int n, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Iui__Rl__Ord

Parameters:
  • n (unsigned int) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_lngamma_sgn_e(x[, ret, sgn, result_lg.val, result_lg.err])

Wrapper for gsl_sf_lngamma_sgn_e() c code signature: int gsl_sf_lngamma_sgn_e( double x, gsl_sf_result* result_lg, double* sgn) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Od_rd

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • sgn (double) – positional argument 2

  • result_lg.val (double) – positional argument 3

  • result_lg.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 1, :param double sgn: positional argument 2, :param double result_lg.val: positional argument 3, :param double result_lg.err: positional argument 4)

Returns:

result

pygsl.math.sf_lngamma_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_lngamma_e() c code signature: int gsl_sf_lngamma_e( double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_lngamma(x[, ret])

Wrapper for gsl_sf_lngamma() c code signature: double gsl_sf_lngamma(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_taylorcoeff(n, x[, ret])

Wrapper for gsl_sf_taylorcoeff() c code signature: double gsl_sf_taylorcoeff(const int n, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rd__O

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_taylorcoeff_e(n, x[, ret, result.val, result.err])

Wrapper for gsl_sf_taylorcoeff_e() c code signature: int gsl_sf_taylorcoeff_e(const int n, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rl__Ord

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_pochrel_e(a, x[, ret, result.val, result.err])

Wrapper for gsl_sf_pochrel_e() c code signature: int gsl_sf_pochrel_e(const double a, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_poch(a, x[, ret])

Wrapper for gsl_sf_poch() c code signature: double gsl_sf_poch(const double a, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_lnpoch_e(a, x[, ret, result.val, result.err])

Wrapper for gsl_sf_lnpoch_e() c code signature: int gsl_sf_lnpoch_e(const double a, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_lnpoch(a, x[, ret])

Wrapper for gsl_sf_lnpoch() c code signature: double gsl_sf_lnpoch(const double a, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_poch_e(a, x[, ret, result.val, result.err])

Wrapper for gsl_sf_poch_e() c code signature: int gsl_sf_poch_e(const double a, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_pochrel(a, x[, ret])

Wrapper for gsl_sf_pochrel() c code signature: double gsl_sf_pochrel(const double a, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_lnpoch_sgn_e(a, x[, ret, sgn, result.val, result.err])

Wrapper for gsl_sf_lnpoch_sgn_e() c code signature: int gsl_sf_lnpoch_sgn_e(const double a, const double x, gsl_sf_result* result, double* sgn) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Od_rd

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • sgn (double) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 2, :param double sgn: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

Gegenbauer Functions

pygsl.math.sf_gegenpoly_2_e(lambda, x[, ret, result.val, result.err])

Wrapper for gsl_sf_gegenpoly_2_e() c code signature: int gsl_sf_gegenpoly_2_e( double lambda, double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • lambda (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_gegenpoly_1(lambda, x[, ret])

Wrapper for gsl_sf_gegenpoly_1() c code signature: double gsl_sf_gegenpoly_1( double lambda, double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • lambda (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_gegenpoly_2(lambda, x[, ret])

Wrapper for gsl_sf_gegenpoly_2() c code signature: double gsl_sf_gegenpoly_2( double lambda, double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • lambda (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_gegenpoly_1_e(lambda, x[, ret, result.val, result.err])

Wrapper for gsl_sf_gegenpoly_1_e() c code signature: int gsl_sf_gegenpoly_1_e( double lambda, double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • lambda (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_gegenpoly_n_e(n, lambda, x[, ret, result.val, result.err])

Wrapper for gsl_sf_gegenpoly_n_e() c code signature: int gsl_sf_gegenpoly_n_e( int n, double lambda, double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d_d__Rl__Ord

Parameters:
  • n (int) – positional argument 0

  • lambda (double) – positional argument 1

  • x (double) – positional argument 2

  • ret (int) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

pygsl.math.sf_gegenpoly_3_e(lambda, x[, ret, result.val, result.err])

Wrapper for gsl_sf_gegenpoly_3_e() c code signature: int gsl_sf_gegenpoly_3_e( double lambda, double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • lambda (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_gegenpoly_3(lambda, x[, ret])

Wrapper for gsl_sf_gegenpoly_3() c code signature: double gsl_sf_gegenpoly_3( double lambda, double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • lambda (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_gegenpoly_n(n, lambda, x[, ret])

Wrapper for gsl_sf_gegenpoly_n() c code signature: double gsl_sf_gegenpoly_n( int n, double lambda, double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d_d__Rd__O

Parameters:
  • n (int) – positional argument 0

  • lambda (double) – positional argument 1

  • x (double) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

Hermite Polynomials and Functions

Hypergeometric Functions

pygsl.math.sf_hyperg_2F1_renorm_e(a, b, c, x[, ret, result.val, result.err])

Wrapper for gsl_sf_hyperg_2F1_renorm_e() c code signature: int gsl_sf_hyperg_2F1_renorm_e(const double a, const double b, const double c, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_d__Rl__Ord

Parameters:
  • a (double) – positional argument 0

  • b (double) – positional argument 1

  • c (double) – positional argument 2

  • x (double) – positional argument 3

  • ret (int) – positional argument 4

  • result.val (double) – positional argument 5

  • result.err (double) – positional argument 6

Return type:

tuple(:param int ret: positional argument 4, :param double result.val: positional argument 5, :param double result.err: positional argument 6)

Returns:

result

pygsl.math.sf_hyperg_U_int(m, n, x[, ret])

Wrapper for gsl_sf_hyperg_U_int() c code signature: double gsl_sf_hyperg_U_int(const int m, const int n, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_d__Rd__O

Parameters:
  • m (int) – positional argument 0

  • n (int) – positional argument 1

  • x (double) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

pygsl.math.sf_hyperg_2F0_e(a, b, x[, ret, result.val, result.err])

Wrapper for gsl_sf_hyperg_2F0_e() c code signature: int gsl_sf_hyperg_2F0_e(const double a, const double b, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d__Rl__Ord

Parameters:
  • a (double) – positional argument 0

  • b (double) – positional argument 1

  • x (double) – positional argument 2

  • ret (int) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

pygsl.math.sf_hyperg_1F1_e(a, b, x[, ret, result.val, result.err])

Wrapper for gsl_sf_hyperg_1F1_e() c code signature: int gsl_sf_hyperg_1F1_e(const double a, const double b, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d__Rl__Ord

Parameters:
  • a (double) – positional argument 0

  • b (double) – positional argument 1

  • x (double) – positional argument 2

  • ret (int) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

pygsl.math.sf_hyperg_2F1_conj_renorm(aR, aI, c, x[, ret])

Wrapper for gsl_sf_hyperg_2F1_conj_renorm() c code signature: double gsl_sf_hyperg_2F1_conj_renorm( double aR, double aI, double c, double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_d__Rd__O

Parameters:
  • aR (double) – positional argument 0

  • aI (double) – positional argument 1

  • c (double) – positional argument 2

  • x (double) – positional argument 3

  • ret (double) – positional argument 4

Return type:

double

Returns:

result

pygsl.math.sf_hyperg_2F1_renorm(a, b, c, x[, ret])

Wrapper for gsl_sf_hyperg_2F1_renorm() c code signature: double gsl_sf_hyperg_2F1_renorm( double a, double b, double c, double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_d__Rd__O

Parameters:
  • a (double) – positional argument 0

  • b (double) – positional argument 1

  • c (double) – positional argument 2

  • x (double) – positional argument 3

  • ret (double) – positional argument 4

Return type:

double

Returns:

result

pygsl.math.sf_hyperg_U_int_e(m, n, x[, ret, result.val, result.err])

Wrapper for gsl_sf_hyperg_U_int_e() c code signature: int gsl_sf_hyperg_U_int_e(const int m, const int n, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_d__Rl__Ord

Parameters:
  • m (int) – positional argument 0

  • n (int) – positional argument 1

  • x (double) – positional argument 2

  • ret (int) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

pygsl.math.sf_hyperg_U_e10_e(a, b, x[, ret, result])

Wrapper for gsl_sf_hyperg_U_e10_e() c code signature: int gsl_sf_hyperg_U_e10_e(const double a, const double b, const double x, gsl_sf_result_e10* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d__Rl__Oerd

Parameters:
  • a (double) – positional argument 0

  • b (double) – positional argument 1

  • x (double) – positional argument 2

  • ret (int) – positional argument 3

  • result (gsl_sf_result_e10) – positional argument 4

Return type:

tuple(:param int ret: positional argument 3, :param gsl_sf_result_e10 result: positional argument 4)

Returns:

result

pygsl.math.sf_hyperg_0F1_e(c, x[, ret, result.val, result.err])

Wrapper for gsl_sf_hyperg_0F1_e() c code signature: int gsl_sf_hyperg_0F1_e( double c, double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • c (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_hyperg_U_int_e10_e(m, n, x[, ret, result])

Wrapper for gsl_sf_hyperg_U_int_e10_e() c code signature: int gsl_sf_hyperg_U_int_e10_e(const int m, const int n, const double x, gsl_sf_result_e10* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_d__Rl__Oerd

Parameters:
  • m (int) – positional argument 0

  • n (int) – positional argument 1

  • x (double) – positional argument 2

  • ret (int) – positional argument 3

  • result (gsl_sf_result_e10) – positional argument 4

Return type:

tuple(:param int ret: positional argument 3, :param gsl_sf_result_e10 result: positional argument 4)

Returns:

result

pygsl.math.sf_hyperg_U_e(a, b, x[, ret, result.val, result.err])

Wrapper for gsl_sf_hyperg_U_e() c code signature: int gsl_sf_hyperg_U_e(const double a, const double b, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d__Rl__Ord

Parameters:
  • a (double) – positional argument 0

  • b (double) – positional argument 1

  • x (double) – positional argument 2

  • ret (int) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

pygsl.math.sf_hyperg_2F1_conj(aR, aI, c, x[, ret])

Wrapper for gsl_sf_hyperg_2F1_conj() c code signature: double gsl_sf_hyperg_2F1_conj( double aR, double aI, double c, double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_d__Rd__O

Parameters:
  • aR (double) – positional argument 0

  • aI (double) – positional argument 1

  • c (double) – positional argument 2

  • x (double) – positional argument 3

  • ret (double) – positional argument 4

Return type:

double

Returns:

result

pygsl.math.sf_hyperg_2F1_e(a, b, c, x[, ret, result.val, result.err])

Wrapper for gsl_sf_hyperg_2F1_e() c code signature: int gsl_sf_hyperg_2F1_e( double a, double b, const double c, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_d__Rl__Ord

Parameters:
  • a (double) – positional argument 0

  • b (double) – positional argument 1

  • c (double) – positional argument 2

  • x (double) – positional argument 3

  • ret (int) – positional argument 4

  • result.val (double) – positional argument 5

  • result.err (double) – positional argument 6

Return type:

tuple(:param int ret: positional argument 4, :param double result.val: positional argument 5, :param double result.err: positional argument 6)

Returns:

result

pygsl.math.sf_hyperg_2F1_conj_e(aR, aI, c, x[, ret, result.val, result.err])

Wrapper for gsl_sf_hyperg_2F1_conj_e() c code signature: int gsl_sf_hyperg_2F1_conj_e(const double aR, const double aI, const double c, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_d__Rl__Ord

Parameters:
  • aR (double) – positional argument 0

  • aI (double) – positional argument 1

  • c (double) – positional argument 2

  • x (double) – positional argument 3

  • ret (int) – positional argument 4

  • result.val (double) – positional argument 5

  • result.err (double) – positional argument 6

Return type:

tuple(:param int ret: positional argument 4, :param double result.val: positional argument 5, :param double result.err: positional argument 6)

Returns:

result

pygsl.math.sf_hyperg_2F1(a, b, c, x[, ret])

Wrapper for gsl_sf_hyperg_2F1() c code signature: double gsl_sf_hyperg_2F1( double a, double b, double c, double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_d__Rd__O

Parameters:
  • a (double) – positional argument 0

  • b (double) – positional argument 1

  • c (double) – positional argument 2

  • x (double) – positional argument 3

  • ret (double) – positional argument 4

Return type:

double

Returns:

result

pygsl.math.sf_hyperg_0F1(c, x[, ret])

Wrapper for gsl_sf_hyperg_0F1() c code signature: double gsl_sf_hyperg_0F1(const double c, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • c (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_hyperg_U(a, b, x[, ret])

Wrapper for gsl_sf_hyperg_U() c code signature: double gsl_sf_hyperg_U(const double a, const double b, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d__Rd__O

Parameters:
  • a (double) – positional argument 0

  • b (double) – positional argument 1

  • x (double) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

pygsl.math.sf_hyperg_2F1_conj_renorm_e(aR, aI, c, x[, ret, result.val, result.err])

Wrapper for gsl_sf_hyperg_2F1_conj_renorm_e() c code signature: int gsl_sf_hyperg_2F1_conj_renorm_e(const double aR, const double aI, const double c, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d_d__Rl__Ord

Parameters:
  • aR (double) – positional argument 0

  • aI (double) – positional argument 1

  • c (double) – positional argument 2

  • x (double) – positional argument 3

  • ret (int) – positional argument 4

  • result.val (double) – positional argument 5

  • result.err (double) – positional argument 6

Return type:

tuple(:param int ret: positional argument 4, :param double result.val: positional argument 5, :param double result.err: positional argument 6)

Returns:

result

pygsl.math.sf_hyperg_1F1_int(m, n, x[, ret])

Wrapper for gsl_sf_hyperg_1F1_int() c code signature: double gsl_sf_hyperg_1F1_int(const int m, const int n, double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_d__Rd__O

Parameters:
  • m (int) – positional argument 0

  • n (int) – positional argument 1

  • x (double) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

pygsl.math.sf_hyperg_1F1_int_e(m, n, x[, ret, result.val, result.err])

Wrapper for gsl_sf_hyperg_1F1_int_e() c code signature: int gsl_sf_hyperg_1F1_int_e(const int m, const int n, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_d__Rl__Ord

Parameters:
  • m (int) – positional argument 0

  • n (int) – positional argument 1

  • x (double) – positional argument 2

  • ret (int) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

pygsl.math.sf_hyperg_1F1(a, b, x[, ret])

Wrapper for gsl_sf_hyperg_1F1() c code signature: double gsl_sf_hyperg_1F1( double a, double b, double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d__Rd__O

Parameters:
  • a (double) – positional argument 0

  • b (double) – positional argument 1

  • x (double) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

pygsl.math.sf_hyperg_2F0(a, b, x[, ret])

Wrapper for gsl_sf_hyperg_2F0() c code signature: double gsl_sf_hyperg_2F0(const double a, const double b, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d_d__Rd__O

Parameters:
  • a (double) – positional argument 0

  • b (double) – positional argument 1

  • x (double) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

Laguerre Functions

pygsl.math.sf_laguerre_3(a, x[, ret])

Wrapper for gsl_sf_laguerre_3() c code signature: double gsl_sf_laguerre_3( double a, double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_laguerre_3_e(a, x[, ret, result.val, result.err])

Wrapper for gsl_sf_laguerre_3_e() c code signature: int gsl_sf_laguerre_3_e(const double a, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_laguerre_2(a, x[, ret])

Wrapper for gsl_sf_laguerre_2() c code signature: double gsl_sf_laguerre_2( double a, double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_laguerre_n(n, a, x[, ret])

Wrapper for gsl_sf_laguerre_n() c code signature: double gsl_sf_laguerre_n( int n, double a, double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d_d__Rd__O

Parameters:
  • n (int) – positional argument 0

  • a (double) – positional argument 1

  • x (double) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

pygsl.math.sf_laguerre_1_e(a, x[, ret, result.val, result.err])

Wrapper for gsl_sf_laguerre_1_e() c code signature: int gsl_sf_laguerre_1_e(const double a, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_laguerre_1(a, x[, ret])

Wrapper for gsl_sf_laguerre_1() c code signature: double gsl_sf_laguerre_1( double a, double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_laguerre_2_e(a, x[, ret, result.val, result.err])

Wrapper for gsl_sf_laguerre_2_e() c code signature: int gsl_sf_laguerre_2_e(const double a, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • a (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_laguerre_n_e(n, a, x[, ret, result.val, result.err])

Wrapper for gsl_sf_laguerre_n_e() c code signature: int gsl_sf_laguerre_n_e(const int n, const double a, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d_d__Rl__Ord

Parameters:
  • n (int) – positional argument 0

  • a (double) – positional argument 1

  • x (double) – positional argument 2

  • ret (int) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

Lambert Functions

pygsl.math.sf_lambert_Wm1_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_lambert_Wm1_e() c code signature: int gsl_sf_lambert_Wm1_e( double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_lambert_Wm1(x[, ret])

Wrapper for gsl_sf_lambert_Wm1() c code signature: double gsl_sf_lambert_Wm1( double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_lambert_W0_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_lambert_W0_e() c code signature: int gsl_sf_lambert_W0_e( double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_lambert_W0(x[, ret])

Wrapper for gsl_sf_lambert_W0() c code signature: double gsl_sf_lambert_W0( double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

Legendre Functions and Spherical Harmonics

pygsl.math.sf_conicalP_cyl_reg(m, lambda, x[, ret])

Wrapper for gsl_sf_conicalP_cyl_reg() c code signature: double gsl_sf_conicalP_cyl_reg(const int m, const double lambda, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d_d__Rd__O

Parameters:
  • m (int) – positional argument 0

  • lambda (double) – positional argument 1

  • x (double) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

pygsl.math.sf_conicalP_sph_reg_e(l, lambda, x[, ret, result.val, result.err])

Wrapper for gsl_sf_conicalP_sph_reg_e() c code signature: int gsl_sf_conicalP_sph_reg_e(const int l, const double lambda, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d_d__Rl__Ord

Parameters:
  • l (int) – positional argument 0

  • lambda (double) – positional argument 1

  • x (double) – positional argument 2

  • ret (int) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

pygsl.math.sf_conicalP_mhalf_e(lambda, x[, ret, result.val, result.err])

Wrapper for gsl_sf_conicalP_mhalf_e() c code signature: int gsl_sf_conicalP_mhalf_e(const double lambda, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • lambda (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_conicalP_0_e(lambda, x[, ret, result.val, result.err])

Wrapper for gsl_sf_conicalP_0_e() c code signature: int gsl_sf_conicalP_0_e(const double lambda, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • lambda (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_conicalP_sph_reg(l, lambda, x[, ret])

Wrapper for gsl_sf_conicalP_sph_reg() c code signature: double gsl_sf_conicalP_sph_reg(const int l, const double lambda, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d_d__Rd__O

Parameters:
  • l (int) – positional argument 0

  • lambda (double) – positional argument 1

  • x (double) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

pygsl.math.sf_conicalP_mhalf(lambda, x[, ret])

Wrapper for gsl_sf_conicalP_mhalf() c code signature: double gsl_sf_conicalP_mhalf(const double lambda, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • lambda (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_conicalP_half(lambda, x[, ret])

Wrapper for gsl_sf_conicalP_half() c code signature: double gsl_sf_conicalP_half(const double lambda, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • lambda (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_conicalP_1_e(lambda, x[, ret, result.val, result.err])

Wrapper for gsl_sf_conicalP_1_e() c code signature: int gsl_sf_conicalP_1_e(const double lambda, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • lambda (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_conicalP_cyl_reg_e(m, lambda, x[, ret, result.val, result.err])

Wrapper for gsl_sf_conicalP_cyl_reg_e() c code signature: int gsl_sf_conicalP_cyl_reg_e(const int m, const double lambda, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d_d__Rl__Ord

Parameters:
  • m (int) – positional argument 0

  • lambda (double) – positional argument 1

  • x (double) – positional argument 2

  • ret (int) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

pygsl.math.sf_conicalP_half_e(lambda, x[, ret, result.val, result.err])

Wrapper for gsl_sf_conicalP_half_e() c code signature: int gsl_sf_conicalP_half_e(const double lambda, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • lambda (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_conicalP_1(lambda, x[, ret])

Wrapper for gsl_sf_conicalP_1() c code signature: double gsl_sf_conicalP_1(const double lambda, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • lambda (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_conicalP_0(lambda, x[, ret])

Wrapper for gsl_sf_conicalP_0() c code signature: double gsl_sf_conicalP_0(const double lambda, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • lambda (double) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_legendre_H3d_e(l, lambda, eta[, ret, result.val, result.err])

Wrapper for gsl_sf_legendre_H3d_e() c code signature: int gsl_sf_legendre_H3d_e(const int l, const double lambda, const double eta, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d_d__Rl__Ord

Parameters:
  • l (int) – positional argument 0

  • lambda (double) – positional argument 1

  • eta (double) – positional argument 2

  • ret (int) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

pygsl.math.sf_legendre_P1(x[, ret])

Wrapper for gsl_sf_legendre_P1() c code signature: double gsl_sf_legendre_P1(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_legendre_P1_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_legendre_P1_e() c code signature: int gsl_sf_legendre_P1_e( double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_legendre_P2(x[, ret])

Wrapper for gsl_sf_legendre_P2() c code signature: double gsl_sf_legendre_P2(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_legendre_H3d_1_e(lambda, eta[, ret, result.val, result.err])

Wrapper for gsl_sf_legendre_H3d_1_e() c code signature: int gsl_sf_legendre_H3d_1_e(const double lambda, const double eta, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • lambda (double) – positional argument 0

  • eta (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_legendre_P3(x[, ret])

Wrapper for gsl_sf_legendre_P3() c code signature: double gsl_sf_legendre_P3(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_legendre_Pl(l, x[, ret])

Wrapper for gsl_sf_legendre_Pl() c code signature: double gsl_sf_legendre_Pl(const int l, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rd__O

Parameters:
  • l (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_legendre_H3d_0_e(lambda, eta[, ret, result.val, result.err])

Wrapper for gsl_sf_legendre_H3d_0_e() c code signature: int gsl_sf_legendre_H3d_0_e(const double lambda, const double eta, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • lambda (double) – positional argument 0

  • eta (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_legendre_sphPlm(l, m, x[, ret])

Wrapper for gsl_sf_legendre_sphPlm() c code signature: double gsl_sf_legendre_sphPlm(const int l, const int m, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_d__Rd__O

Parameters:
  • l (int) – positional argument 0

  • m (int) – positional argument 1

  • x (double) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

pygsl.math.sf_legendre_sphPlm_e(l, m, x[, ret, result.val, result.err])

Wrapper for gsl_sf_legendre_sphPlm_e() c code signature: int gsl_sf_legendre_sphPlm_e(const int l, int m, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_d__Rl__Ord

Parameters:
  • l (int) – positional argument 0

  • m (int) – positional argument 1

  • x (double) – positional argument 2

  • ret (int) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

pygsl.math.sf_legendre_H3d_0(lambda, eta[, ret])

Wrapper for gsl_sf_legendre_H3d_0() c code signature: double gsl_sf_legendre_H3d_0(const double lambda, const double eta) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • lambda (double) – positional argument 0

  • eta (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_legendre_Q0_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_legendre_Q0_e() c code signature: int gsl_sf_legendre_Q0_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_legendre_P2_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_legendre_P2_e() c code signature: int gsl_sf_legendre_P2_e( double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_legendre_H3d_1(lambda, eta[, ret])

Wrapper for gsl_sf_legendre_H3d_1() c code signature: double gsl_sf_legendre_H3d_1(const double lambda, const double eta) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • lambda (double) – positional argument 0

  • eta (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_legendre_Ql(l, x[, ret])

Wrapper for gsl_sf_legendre_Ql() c code signature: double gsl_sf_legendre_Ql(const int l, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rd__O

Parameters:
  • l (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_legendre_Ql_e(l, x[, ret, result.val, result.err])

Wrapper for gsl_sf_legendre_Ql_e() c code signature: int gsl_sf_legendre_Ql_e(const int l, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rl__Ord

Parameters:
  • l (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_legendre_P3_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_legendre_P3_e() c code signature: int gsl_sf_legendre_P3_e( double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_legendre_Q1_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_legendre_Q1_e() c code signature: int gsl_sf_legendre_Q1_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_legendre_Q1(x[, ret])

Wrapper for gsl_sf_legendre_Q1() c code signature: double gsl_sf_legendre_Q1(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_legendre_Plm(l, m, x[, ret])

Wrapper for gsl_sf_legendre_Plm() c code signature: double gsl_sf_legendre_Plm(const int l, const int m, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_d__Rd__O

Parameters:
  • l (int) – positional argument 0

  • m (int) – positional argument 1

  • x (double) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

pygsl.math.sf_legendre_Pl_e(l, x[, ret, result.val, result.err])

Wrapper for gsl_sf_legendre_Pl_e() c code signature: int gsl_sf_legendre_Pl_e(const int l, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rl__Ord

Parameters:
  • l (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_legendre_H3d(l, lambda, eta[, ret])

Wrapper for gsl_sf_legendre_H3d() c code signature: double gsl_sf_legendre_H3d(const int l, const double lambda, const double eta) Wrapped by ufunc PyGSL_sf_ufunc_Il_d_d__Rd__O

Parameters:
  • l (int) – positional argument 0

  • lambda (double) – positional argument 1

  • eta (double) – positional argument 2

  • ret (double) – positional argument 3

Return type:

double

Returns:

result

pygsl.math.sf_legendre_Plm_e(l, m, x[, ret, result.val, result.err])

Wrapper for gsl_sf_legendre_Plm_e() c code signature: int gsl_sf_legendre_Plm_e(const int l, const int m, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_d__Rl__Ord

Parameters:
  • l (int) – positional argument 0

  • m (int) – positional argument 1

  • x (double) – positional argument 2

  • ret (int) – positional argument 3

  • result.val (double) – positional argument 4

  • result.err (double) – positional argument 5

Return type:

tuple(:param int ret: positional argument 3, :param double result.val: positional argument 4, :param double result.err: positional argument 5)

Returns:

result

pygsl.math.sf_legendre_Q0(x[, ret])

Wrapper for gsl_sf_legendre_Q0() c code signature: double gsl_sf_legendre_Q0(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

Mathieu functions

Power functions

pygsl.math.complex_pow_real(a, b[, ret])

Wrapper for gsl_complex_pow_real() c code signature: gsl_complex gsl_complex_pow_real( gsl_complex a, double b) Wrapped by ufunc PyGSL_sf_ufunc_ID_d__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • b (double) – positional argument 1

  • ret (gsl_complex) – positional argument 2

Return type:

gsl_complex

Returns:

result

pygsl.math.sf_pow_int(x, n[, ret])

Wrapper for gsl_sf_pow_int() c code signature: double gsl_sf_pow_int(const double x, const int n) Wrapped by ufunc PyGSL_sf_ufunc_Id_l__Rd__O

Parameters:
  • x (double) – positional argument 0

  • n (int) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_pow_int_e(x, n[, ret, result.val, result.err])

Wrapper for gsl_sf_pow_int_e() c code signature: int gsl_sf_pow_int_e( double x, int n, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_l__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • n (int) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.complex_pow(a, b[, ret])

Wrapper for gsl_complex_pow() c code signature: gsl_complex gsl_complex_pow( gsl_complex a, gsl_complex b) Wrapped by ufunc PyGSL_sf_ufunc_ID_D__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • b (gsl_complex) – positional argument 1

  • ret (gsl_complex) – positional argument 2

Return type:

gsl_complex

Returns:

result

Psi functions

pygsl.math.sf_psi_n(n, x[, ret])

Wrapper for gsl_sf_psi_n() c code signature: double gsl_sf_psi_n(const int n, const double x) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rd__O

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_psi_1_int(n[, ret])

Wrapper for gsl_sf_psi_1_int() c code signature: double gsl_sf_psi_1_int(const int n) Wrapped by ufunc PyGSL_sf_ufunc_Il__Rd__O

Parameters:
  • n (int) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_complex_psi_e(x, y[, ret, result_im.val, result_im.err, result_re.val, result_re.err])

Wrapper for gsl_sf_complex_psi_e() c code signature: int gsl_sf_complex_psi_e(const double x, const double y, gsl_sf_result* result_re, gsl_sf_result* result_im) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord_rd

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • ret (int) – positional argument 2

  • result_im.val (double) – positional argument 3

  • result_im.err (double) – positional argument 4

  • result_re.val (double) – positional argument 5

  • result_re.err (double) – positional argument 6

Return type:

tuple(:param int ret: positional argument 2, :param double result_im.val: positional argument 3, :param double result_im.err: positional argument 4, :param double result_re.val: positional argument 5, :param double result_re.err: positional argument 6)

Returns:

result

pygsl.math.sf_psi_int_e(n[, ret, result.val, result.err])

Wrapper for gsl_sf_psi_int_e() c code signature: int gsl_sf_psi_int_e(const int n, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il__Rl__Ord

Parameters:
  • n (int) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_psi_1_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_psi_1_e() c code signature: int gsl_sf_psi_1_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_psi_1piy(y[, ret])

Wrapper for gsl_sf_psi_1piy() c code signature: double gsl_sf_psi_1piy(const double y) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • y (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_psi_1_int_e(n[, ret, result.val, result.err])

Wrapper for gsl_sf_psi_1_int_e() c code signature: int gsl_sf_psi_1_int_e(const int n, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il__Rl__Ord

Parameters:
  • n (int) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_psi_int(n[, ret])

Wrapper for gsl_sf_psi_int() c code signature: double gsl_sf_psi_int(const int n) Wrapped by ufunc PyGSL_sf_ufunc_Il__Rd__O

Parameters:
  • n (int) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_psi_n_e(n, x[, ret, result.val, result.err])

Wrapper for gsl_sf_psi_n_e() c code signature: int gsl_sf_psi_n_e(const int n, const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_d__Rl__Ord

Parameters:
  • n (int) – positional argument 0

  • x (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_psi_1(x[, ret])

Wrapper for gsl_sf_psi_1() c code signature: double gsl_sf_psi_1(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_psi(x[, ret])

Wrapper for gsl_sf_psi() c code signature: double gsl_sf_psi(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_psi_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_psi_e() c code signature: int gsl_sf_psi_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_psi_1piy_e(y[, ret, result.val, result.err])

Wrapper for gsl_sf_psi_1piy_e() c code signature: int gsl_sf_psi_1piy_e(const double y, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • y (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

Synchrotron functions

pygsl.math.sf_synchrotron_2_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_synchrotron_2_e() c code signature: int gsl_sf_synchrotron_2_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_synchrotron_2(x[, ret])

Wrapper for gsl_sf_synchrotron_2() c code signature: double gsl_sf_synchrotron_2(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_synchrotron_1_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_synchrotron_1_e() c code signature: int gsl_sf_synchrotron_1_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_synchrotron_1(x[, ret])

Wrapper for gsl_sf_synchrotron_1() c code signature: double gsl_sf_synchrotron_1(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

Transport Functions

pygsl.math.sf_transport_2_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_transport_2_e() c code signature: int gsl_sf_transport_2_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_transport_5(x[, ret])

Wrapper for gsl_sf_transport_5() c code signature: double gsl_sf_transport_5(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_transport_5_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_transport_5_e() c code signature: int gsl_sf_transport_5_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_transport_3_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_transport_3_e() c code signature: int gsl_sf_transport_3_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_transport_2(x[, ret])

Wrapper for gsl_sf_transport_2() c code signature: double gsl_sf_transport_2(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_transport_3(x[, ret])

Wrapper for gsl_sf_transport_3() c code signature: double gsl_sf_transport_3(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_transport_4_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_transport_4_e() c code signature: int gsl_sf_transport_4_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_transport_4(x[, ret])

Wrapper for gsl_sf_transport_4() c code signature: double gsl_sf_transport_4(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

Trigonometric Functions

pygsl.math.acosh(x[, ret])

Wrapper for gsl_acosh() c code signature: double gsl_acosh(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.asinh(x[, ret])

Wrapper for gsl_asinh() c code signature: double gsl_asinh(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.atanh(x[, ret])

Wrapper for gsl_atanh() c code signature: double gsl_atanh(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_cos_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_cos_e() c code signature: int gsl_sf_cos_e( double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_cos(x[, ret])

Wrapper for gsl_sf_cos() c code signature: double gsl_sf_cos(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_cos_err_e(x, dx[, ret, result.val, result.err])

Wrapper for gsl_sf_cos_err_e() c code signature: int gsl_sf_cos_err_e(const double x, const double dx, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • dx (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_sin_err_e(x, dx[, ret, result.val, result.err])

Wrapper for gsl_sf_sin_err_e() c code signature: int gsl_sf_sin_err_e(const double x, const double dx, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • dx (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_sin_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_sin_e() c code signature: int gsl_sf_sin_e( double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_sin(x[, ret])

Wrapper for gsl_sf_sin() c code signature: double gsl_sf_sin(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_sinc(x[, ret])

Wrapper for gsl_sf_sinc() c code signature: double gsl_sf_sinc(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_sinc_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_sinc_e() c code signature: int gsl_sf_sinc_e( double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_angle_restrict_pos_err_e(theta[, ret, result.val, result.err])

Wrapper for gsl_sf_angle_restrict_pos_err_e() c code signature: int gsl_sf_angle_restrict_pos_err_e(const double theta, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • theta (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_angle_restrict_pos(theta[, ret])

Wrapper for gsl_sf_angle_restrict_pos() c code signature: double gsl_sf_angle_restrict_pos(const double theta) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • theta (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_angle_restrict_symm(theta[, ret])

Wrapper for gsl_sf_angle_restrict_symm() c code signature: double gsl_sf_angle_restrict_symm(const double theta) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • theta (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_angle_restrict_symm_err_e(theta[, ret, result.val, result.err])

Wrapper for gsl_sf_angle_restrict_symm_err_e() c code signature: int gsl_sf_angle_restrict_symm_err_e(const double theta, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • theta (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_hypot(x, y[, ret])

Wrapper for gsl_sf_hypot() c code signature: double gsl_sf_hypot(const double x, const double y) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_hypot_e(x, y[, ret, result.val, result.err])

Wrapper for gsl_sf_hypot_e() c code signature: int gsl_sf_hypot_e(const double x, const double y, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_lncosh_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_lncosh_e() c code signature: int gsl_sf_lncosh_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_lncosh(x[, ret])

Wrapper for gsl_sf_lncosh() c code signature: double gsl_sf_lncosh(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_lnsinh_e(x[, ret, result.val, result.err])

Wrapper for gsl_sf_lnsinh_e() c code signature: int gsl_sf_lnsinh_e(const double x, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • x (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_lnsinh(x[, ret])

Wrapper for gsl_sf_lnsinh() c code signature: double gsl_sf_lnsinh(const double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • x (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

Zeta Functions

pygsl.math.sf_eta_int(n[, ret])

Wrapper for gsl_sf_eta_int() c code signature: double gsl_sf_eta_int(const int n) Wrapped by ufunc PyGSL_sf_ufunc_Il__Rd__O

Parameters:
  • n (int) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_eta_e(s[, ret, result.val, result.err])

Wrapper for gsl_sf_eta_e() c code signature: int gsl_sf_eta_e(const double s, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • s (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_eta_int_e(n[, ret, result.val, result.err])

Wrapper for gsl_sf_eta_int_e() c code signature: int gsl_sf_eta_int_e( int n, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il__Rl__Ord

Parameters:
  • n (int) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_eta(s[, ret])

Wrapper for gsl_sf_eta() c code signature: double gsl_sf_eta(const double s) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • s (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_hzeta(s, q[, ret])

Wrapper for gsl_sf_hzeta() c code signature: double gsl_sf_hzeta(const double s, const double q) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • s (double) – positional argument 0

  • q (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_hzeta_e(s, q[, ret, result.val, result.err])

Wrapper for gsl_sf_hzeta_e() c code signature: int gsl_sf_hzeta_e(const double s, const double q, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • s (double) – positional argument 0

  • q (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_zeta(s[, ret])

Wrapper for gsl_sf_zeta() c code signature: double gsl_sf_zeta(const double s) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • s (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_zeta_e(s[, ret, result.val, result.err])

Wrapper for gsl_sf_zeta_e() c code signature: int gsl_sf_zeta_e(const double s, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • s (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_zeta_int_e(n[, ret, result.val, result.err])

Wrapper for gsl_sf_zeta_int_e() c code signature: int gsl_sf_zeta_int_e(const int n, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il__Rl__Ord

Parameters:
  • n (int) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_zetam1_int_e(s[, ret, result.val, result.err])

Wrapper for gsl_sf_zetam1_int_e() c code signature: int gsl_sf_zetam1_int_e(const int s, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il__Rl__Ord

Parameters:
  • s (int) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_zetam1_int(s[, ret])

Wrapper for gsl_sf_zetam1_int() c code signature: double gsl_sf_zetam1_int(const int s) Wrapped by ufunc PyGSL_sf_ufunc_Il__Rd__O

Parameters:
  • s (int) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_zetam1(s[, ret])

Wrapper for gsl_sf_zetam1() c code signature: double gsl_sf_zetam1(const double s) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rd__O

Parameters:
  • s (double) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.sf_zetam1_e(s[, ret, result.val, result.err])

Wrapper for gsl_sf_zetam1_e() c code signature: int gsl_sf_zetam1_e(const double s, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id__Rl__Ord

Parameters:
  • s (double) – positional argument 0

  • ret (int) – positional argument 1

  • result.val (double) – positional argument 2

  • result.err (double) – positional argument 3

Return type:

tuple(:param int ret: positional argument 1, :param double result.val: positional argument 2, :param double result.err: positional argument 3)

Returns:

result

pygsl.math.sf_zeta_int(n[, ret])

Wrapper for gsl_sf_zeta_int() c code signature: double gsl_sf_zeta_int(const int n) Wrapped by ufunc PyGSL_sf_ufunc_Il__Rd__O

Parameters:
  • n (int) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

Complex implementations of standard functions

pygsl.math.complex_negative(a[, ret])

Wrapper for gsl_complex_negative() c code signature: gsl_complex gsl_complex_negative( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_log10(a[, ret])

Wrapper for gsl_complex_log10() c code signature: gsl_complex gsl_complex_log10( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arctanh_real(a[, ret])

Wrapper for gsl_complex_arctanh_real() c code signature: gsl_complex gsl_complex_arctanh_real( double a) Wrapped by ufunc PyGSL_sf_ufunc_Id__RD__O

Parameters:
  • a (double) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_add_real(a, x[, ret])

Wrapper for gsl_complex_add_real() c code signature: gsl_complex gsl_complex_add_real( gsl_complex a, double x) Wrapped by ufunc PyGSL_sf_ufunc_ID_d__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • x (double) – positional argument 1

  • ret (gsl_complex) – positional argument 2

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_exp(a[, ret])

Wrapper for gsl_complex_exp() c code signature: gsl_complex gsl_complex_exp( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_log_b(a, b[, ret])

Wrapper for gsl_complex_log_b() c code signature: gsl_complex gsl_complex_log_b( gsl_complex a, gsl_complex b) Wrapped by ufunc PyGSL_sf_ufunc_ID_D__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • b (gsl_complex) – positional argument 1

  • ret (gsl_complex) – positional argument 2

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_logabs(z[, ret])

Wrapper for gsl_complex_logabs() c code signature: double gsl_complex_logabs( gsl_complex z) Wrapped by ufunc PyGSL_sf_ufunc_ID__Rd__O

Parameters:
  • z (gsl_complex) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.complex_polar(r, theta[, ret])

Wrapper for gsl_complex_polar() c code signature: gsl_complex gsl_complex_polar( double r, double theta) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__RD__O

Parameters:
  • r (double) – positional argument 0

  • theta (double) – positional argument 1

  • ret (gsl_complex) – positional argument 2

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arctanh(a[, ret])

Wrapper for gsl_complex_arctanh() c code signature: gsl_complex gsl_complex_arctanh( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_abs(z[, ret])

Wrapper for gsl_complex_abs() c code signature: double gsl_complex_abs( gsl_complex z) Wrapped by ufunc PyGSL_sf_ufunc_ID__Rd__O

Parameters:
  • z (gsl_complex) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.complex_sech(a[, ret])

Wrapper for gsl_complex_sech() c code signature: gsl_complex gsl_complex_sech( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_div_imag(a, y[, ret])

Wrapper for gsl_complex_div_imag() c code signature: gsl_complex gsl_complex_div_imag( gsl_complex a, double y) Wrapped by ufunc PyGSL_sf_ufunc_ID_d__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • y (double) – positional argument 1

  • ret (gsl_complex) – positional argument 2

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_cot(a[, ret])

Wrapper for gsl_complex_cot() c code signature: gsl_complex gsl_complex_cot( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_sqrt_real(x[, ret])

Wrapper for gsl_complex_sqrt_real() c code signature: gsl_complex gsl_complex_sqrt_real( double x) Wrapped by ufunc PyGSL_sf_ufunc_Id__RD__O

Parameters:
  • x (double) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arccsc(a[, ret])

Wrapper for gsl_complex_arccsc() c code signature: gsl_complex gsl_complex_arccsc( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_mul_imag(a, y[, ret])

Wrapper for gsl_complex_mul_imag() c code signature: gsl_complex gsl_complex_mul_imag( gsl_complex a, double y) Wrapped by ufunc PyGSL_sf_ufunc_ID_d__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • y (double) – positional argument 1

  • ret (gsl_complex) – positional argument 2

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arctan(a[, ret])

Wrapper for gsl_complex_arctan() c code signature: gsl_complex gsl_complex_arctan( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_tanh(a[, ret])

Wrapper for gsl_complex_tanh() c code signature: gsl_complex gsl_complex_tanh( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_sin(a[, ret])

Wrapper for gsl_complex_sin() c code signature: gsl_complex gsl_complex_sin( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arcsin_real(a[, ret])

Wrapper for gsl_complex_arcsin_real() c code signature: gsl_complex gsl_complex_arcsin_real( double a) Wrapped by ufunc PyGSL_sf_ufunc_Id__RD__O

Parameters:
  • a (double) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_sub_real(a, x[, ret])

Wrapper for gsl_complex_sub_real() c code signature: gsl_complex gsl_complex_sub_real( gsl_complex a, double x) Wrapped by ufunc PyGSL_sf_ufunc_ID_d__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • x (double) – positional argument 1

  • ret (gsl_complex) – positional argument 2

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_cosh(a[, ret])

Wrapper for gsl_complex_cosh() c code signature: gsl_complex gsl_complex_cosh( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arccos_real(a[, ret])

Wrapper for gsl_complex_arccos_real() c code signature: gsl_complex gsl_complex_arccos_real( double a) Wrapped by ufunc PyGSL_sf_ufunc_Id__RD__O

Parameters:
  • a (double) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arcsinh(a[, ret])

Wrapper for gsl_complex_arcsinh() c code signature: gsl_complex gsl_complex_arcsinh( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_log(a[, ret])

Wrapper for gsl_complex_log() c code signature: gsl_complex gsl_complex_log( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_csc(a[, ret])

Wrapper for gsl_complex_csc() c code signature: gsl_complex gsl_complex_csc( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_mul_real(a, x[, ret])

Wrapper for gsl_complex_mul_real() c code signature: gsl_complex gsl_complex_mul_real( gsl_complex a, double x) Wrapped by ufunc PyGSL_sf_ufunc_ID_d__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • x (double) – positional argument 1

  • ret (gsl_complex) – positional argument 2

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_inverse(a[, ret])

Wrapper for gsl_complex_inverse() c code signature: gsl_complex gsl_complex_inverse( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arccosh_real(a[, ret])

Wrapper for gsl_complex_arccosh_real() c code signature: gsl_complex gsl_complex_arccosh_real( double a) Wrapped by ufunc PyGSL_sf_ufunc_Id__RD__O

Parameters:
  • a (double) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_div(a, b[, ret])

Wrapper for gsl_complex_div() c code signature: gsl_complex gsl_complex_div( gsl_complex a, gsl_complex b) Wrapped by ufunc PyGSL_sf_ufunc_ID_D__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • b (gsl_complex) – positional argument 1

  • ret (gsl_complex) – positional argument 2

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_sinh(a[, ret])

Wrapper for gsl_complex_sinh() c code signature: gsl_complex gsl_complex_sinh( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_csch(a[, ret])

Wrapper for gsl_complex_csch() c code signature: gsl_complex gsl_complex_csch( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arcsech(a[, ret])

Wrapper for gsl_complex_arcsech() c code signature: gsl_complex gsl_complex_arcsech( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_mul(a, b[, ret])

Wrapper for gsl_complex_mul() c code signature: gsl_complex gsl_complex_mul( gsl_complex a, gsl_complex b) Wrapped by ufunc PyGSL_sf_ufunc_ID_D__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • b (gsl_complex) – positional argument 1

  • ret (gsl_complex) – positional argument 2

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arg(z[, ret])

Wrapper for gsl_complex_arg() c code signature: double gsl_complex_arg( gsl_complex z) Wrapped by ufunc PyGSL_sf_ufunc_ID__Rd__O

Parameters:
  • z (gsl_complex) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

pygsl.math.complex_sub_imag(a, y[, ret])

Wrapper for gsl_complex_sub_imag() c code signature: gsl_complex gsl_complex_sub_imag( gsl_complex a, double y) Wrapped by ufunc PyGSL_sf_ufunc_ID_d__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • y (double) – positional argument 1

  • ret (gsl_complex) – positional argument 2

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_add_imag(a, y[, ret])

Wrapper for gsl_complex_add_imag() c code signature: gsl_complex gsl_complex_add_imag( gsl_complex a, double y) Wrapped by ufunc PyGSL_sf_ufunc_ID_d__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • y (double) – positional argument 1

  • ret (gsl_complex) – positional argument 2

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_sqrt(z[, ret])

Wrapper for gsl_complex_sqrt() c code signature: gsl_complex gsl_complex_sqrt( gsl_complex z) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • z (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arccsch(a[, ret])

Wrapper for gsl_complex_arccsch() c code signature: gsl_complex gsl_complex_arccsch( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_div_real(a, x[, ret])

Wrapper for gsl_complex_div_real() c code signature: gsl_complex gsl_complex_div_real( gsl_complex a, double x) Wrapped by ufunc PyGSL_sf_ufunc_ID_d__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • x (double) – positional argument 1

  • ret (gsl_complex) – positional argument 2

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_coth(a[, ret])

Wrapper for gsl_complex_coth() c code signature: gsl_complex gsl_complex_coth( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arcsin(a[, ret])

Wrapper for gsl_complex_arcsin() c code signature: gsl_complex gsl_complex_arcsin( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_add(a, b[, ret])

Wrapper for gsl_complex_add() c code signature: gsl_complex gsl_complex_add( gsl_complex a, gsl_complex b) Wrapped by ufunc PyGSL_sf_ufunc_ID_D__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • b (gsl_complex) – positional argument 1

  • ret (gsl_complex) – positional argument 2

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_sub(a, b[, ret])

Wrapper for gsl_complex_sub() c code signature: gsl_complex gsl_complex_sub( gsl_complex a, gsl_complex b) Wrapped by ufunc PyGSL_sf_ufunc_ID_D__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • b (gsl_complex) – positional argument 1

  • ret (gsl_complex) – positional argument 2

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_sec(a[, ret])

Wrapper for gsl_complex_sec() c code signature: gsl_complex gsl_complex_sec( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arccos(a[, ret])

Wrapper for gsl_complex_arccos() c code signature: gsl_complex gsl_complex_arccos( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_tan(a[, ret])

Wrapper for gsl_complex_tan() c code signature: gsl_complex gsl_complex_tan( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_conjugate(z[, ret])

Wrapper for gsl_complex_conjugate() c code signature: gsl_complex gsl_complex_conjugate( gsl_complex z) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • z (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arccsc_real(a[, ret])

Wrapper for gsl_complex_arccsc_real() c code signature: gsl_complex gsl_complex_arccsc_real( double a) Wrapped by ufunc PyGSL_sf_ufunc_Id__RD__O

Parameters:
  • a (double) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arccoth(a[, ret])

Wrapper for gsl_complex_arccoth() c code signature: gsl_complex gsl_complex_arccoth( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arcsec(a[, ret])

Wrapper for gsl_complex_arcsec() c code signature: gsl_complex gsl_complex_arcsec( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arccosh(a[, ret])

Wrapper for gsl_complex_arccosh() c code signature: gsl_complex gsl_complex_arccosh( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_rect(x, y[, ret])

Wrapper for gsl_complex_rect() c code signature: gsl_complex gsl_complex_rect( double x, double y) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__RD__O

Parameters:
  • x (double) – positional argument 0

  • y (double) – positional argument 1

  • ret (gsl_complex) – positional argument 2

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arcsec_real(a[, ret])

Wrapper for gsl_complex_arcsec_real() c code signature: gsl_complex gsl_complex_arcsec_real( double a) Wrapped by ufunc PyGSL_sf_ufunc_Id__RD__O

Parameters:
  • a (double) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_cos(a[, ret])

Wrapper for gsl_complex_cos() c code signature: gsl_complex gsl_complex_cos( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_arccot(a[, ret])

Wrapper for gsl_complex_arccot() c code signature: gsl_complex gsl_complex_arccot( gsl_complex a) Wrapped by ufunc PyGSL_sf_ufunc_ID__RD__O

Parameters:
  • a (gsl_complex) – positional argument 0

  • ret (gsl_complex) – positional argument 1

Return type:

gsl_complex

Returns:

result

pygsl.math.complex_abs2(z[, ret])

Wrapper for gsl_complex_abs2() c code signature: double gsl_complex_abs2( gsl_complex z) Wrapped by ufunc PyGSL_sf_ufunc_ID__Rd__O

Parameters:
  • z (gsl_complex) – positional argument 0

  • ret (double) – positional argument 1

Return type:

double

Returns:

result

Unsorted functions

Hydrogenic functions

pygsl.math.sf_hydrogenicR_1(Z, r[, ret])

Wrapper for gsl_sf_hydrogenicR_1() c code signature: double gsl_sf_hydrogenicR_1(const double Z, const double r) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rd__O

Parameters:
  • Z (double) – positional argument 0

  • r (double) – positional argument 1

  • ret (double) – positional argument 2

Return type:

double

Returns:

result

pygsl.math.sf_hydrogenicR(n, l, Z, r[, ret])

Wrapper for gsl_sf_hydrogenicR() c code signature: double gsl_sf_hydrogenicR(const int n, const int l, const double Z, const double r) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_d_d__Rd__O

Parameters:
  • n (int) – positional argument 0

  • l (int) – positional argument 1

  • Z (double) – positional argument 2

  • r (double) – positional argument 3

  • ret (double) – positional argument 4

Return type:

double

Returns:

result

pygsl.math.sf_hydrogenicR_1_e(Z, r[, ret, result.val, result.err])

Wrapper for gsl_sf_hydrogenicR_1_e() c code signature: int gsl_sf_hydrogenicR_1_e(const double Z, const double r, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Id_d__Rl__Ord

Parameters:
  • Z (double) – positional argument 0

  • r (double) – positional argument 1

  • ret (int) – positional argument 2

  • result.val (double) – positional argument 3

  • result.err (double) – positional argument 4

Return type:

tuple(:param int ret: positional argument 2, :param double result.val: positional argument 3, :param double result.err: positional argument 4)

Returns:

result

pygsl.math.sf_hydrogenicR_e(n, l, Z, r[, ret, result.val, result.err])

Wrapper for gsl_sf_hydrogenicR_e() c code signature: int gsl_sf_hydrogenicR_e(const int n, const int l, const double Z, const double r, gsl_sf_result* result) Wrapped by ufunc PyGSL_sf_ufunc_Il_l_d_d__Rl__Ord

Parameters:
  • n (int) – positional argument 0

  • l (int) – positional argument 1

  • Z (double) – positional argument 2

  • r (double) – positional argument 3

  • ret (int) – positional argument 4

  • result.val (double) – positional argument 5

  • result.err (double) – positional argument 6

Return type:

tuple(:param int ret: positional argument 4, :param double result.val: positional argument 5, :param double result.err: positional argument 6)

Returns:

result

poly

Wrapper over the functions as described in Chaper 6 of the reference manual.

There are routines for finding real and complex roots of quadratic and cubic equations using analytic methods. An iterative polynomial solver is also available for finding the roots of general polynomials with real coefficients (of any order).

All the doc strings were taken form the gsl reference document.

pygsl.poly.complex_solve_cubic(*args)[source]

This function finds the complex roots of the cubic equation,

z^3 + a z^2 + b z + c = 0

The number of complex roots is returned (always three) and the locations of the roots are stored in z0, z1 and z2. The roots are returned in ascending order, sorted first by their real components and then by their imaginary components.

input : a, b, c

outputn, r1, r2

n … number of roots found r1 … first root r2 … second root r3 … third root

pygsl.poly.complex_solve_quadratic(*args)[source]

The complex version of solve quadratic. See solve_quadratic for explanation.

class pygsl.poly.poly_complex(dimension)[source]

Bases: object

The roots of polynomial equations cannot be found analytically beyond the special cases of the quadratic, cubic and quartic equation. This class uses an iterative method to find the approximate locations of roots of higher order polynomials.

solve(a)[source]

This function computes the roots of the general polynomial P(x) = a_0 + a_1 x + a_2 x^2 + … + a_{n-1} x^{n-1} using balanced-QR reduction of the companion matrix. The parameter n specifies the length of the coefficient array. The coefficient of the highest order term must be non-zero. The function requires a workspace w of the appropriate size. The n-1 roots are returned in the packed complex array z of length 2(n-1), alternating real and imaginary parts.

The function returns GSL_SUCCESS if all the roots are found and GSL_EFAILED if the QR reduction does not converge.

inputz

z … Array of complex coefficients.

outputflag, z_out

flag … GSL_SUCCESS or GSL_FAILURE z … Array of complex roots

class pygsl.poly.poly_dd(xa, ya)[source]

Bases: object

This class manipulates polynomials stored in Newton’s divided-difference representation. The use of divided-differences is described in Abramowitz & Stegun sections 25.1.4, 25.2.26.

eval(x)[source]

This method evaluates the polynomial stored in divided-difference form at point x.

inputx

x … point

output : y

taylor(xp)[source]

This method converts the internal divided-difference representation of a polynomial to a Taylor expansion.

inputxp

xp … point to expand about

pygsl.poly.poly_eval(*args)[source]

This function evaluates the polynomial c[0] + c[1] x + c[2] x^2 + dots + c[len-1] x^{len-1} using Horner’s method for stability

input: c, x

c … array of coefficients x …

output: y

pygsl.poly.solve_cubic(*args)[source]

This function finds the real roots of the cubic equation,

x^3 + a x^2 + b x + c = 0

with a leading coefficient of unity. The number of real roots (either one or three) is returned, and their locations are stored in x0, x1 and x2. If one real root is found then only x0 is modified. When three real roots are found they are stored in x0, x1 and x2 in ascending order. The case of coincident roots is not considered special. For example, the equation (x-1)^3=0 will have three roots with exactly equal values.

input : a, b, c

outputn, r1, r2

n … number of roots found r1 … first root r2 … second root r3 … third root

pygsl.poly.solve_quadratic(*args)[source]

a x^2 + b x + c = 0

The number of real roots (either zero or two) is returned, and their locations are stored in x0 and x1. If no real roots are found then x0 and x1 are not modified. When two real roots are found they are stored in x0 and x1 in ascending order. The case of coincident roots is not considered special. For example (x-1)^2=0 will have two roots, which happen to have exactly equal values.

The number of roots found depends on the sign of the discriminant b^2 - 4 a c. This will be subject to rounding and cancellation errors when computed in double precision, and will also be subject to errors if the coefficients of the polynomial are inexact. These errors may cause a discrete change in the number of roots. However, for polynomials with small integer coefficients the discriminant can always be computed exactly.

input : a, b, c

outputn, r1, r2

n … number of roots found r1 … first root r2 … second root

permutation

Permutation

This chapter describes functions for creating and manipulating permutations. A permutation p is represented by an array of n integers in the range 0 .. n-1, where each value \(p_i\) occurs once and only once. The application of a permutation p to a vector \(v\) yields a new vector \(v'\) where \(v'_i = v_{p_i}.\) For example, the array (0,1,3,2) represents a permutation which exchanges the last two elements of a four element vector. The corresponding identity permutation is (0,1,2,3).

class pygsl.permutation.Permutation[source]

Bases: Permutation

canonical_to_linear()[source]

Computes the linear form of the current permutation and returns it in a new permutation

inverse()[source]

Computes the inverse form of the current permutation and returns it in a new permutation.

linear_to_canonical()[source]

Computes the canonical form of the current permutation and returns it in a new permutation

mul(b)[source]

Mutliplies this permutation with an other permutation and returns the result in a new permutation.

combination

Wrapper for the combination.

Usage:

Initalisation:

c = Combination(n, k)

Testing for validness:

c.valid() returns 0 = GSL_SUCCESS if ok. Raises a gsl_DomainError if invalid.

The gsl_combination_get is wrapped by:
  • c.tolist()

  • c.toarray()

Both will return the actual combination.

Stepping between the various combinations:
  • c.prev()

  • c.next()

Both return 0 in case of success and -1 in case of failure.

class pygsl.combination.Combination

::gsl_combination_struct

blas

BLAS - Basic Linear Algebra Subprograms

GSL provides dense vector and matrix objects, based on the relevant built-in types. The library provides an interface to the BLAS operations which apply to these objects.

PyGSL only provides the functions working on “native” Python datatypes, i.e. double and complex_double.

Functions with the postfix “_cr” are functions that support call by reference. This is faster than the original version but may confuse real Python programmers. Use this, if speed matters!!

Functions that are naturally done using functions of the underlying numerical package are left out here.

pygsl.blas.dasum(x)[source]

This function computes the absolute sum M{sum |x_i|} of the elements of the vector x.

pygsl.blas.daxpy(alpha, x, y)[source]

This function computes the sum M{y = S{alpha} x + y} for the vectors x and y.

pygsl.blas.daxpy_cr(alpha, x, y_CR)[source]

This function computes the sum M{y = S{alpha} x + y} for the vectors x and y.

pygsl.blas.ddot(x, y)[source]

This function computes the scalar product M{x^T y} for the vectors x and y, returning the result.

pygsl.blas.dgemm(alpha, A, B, beta, C, TransA=111, TransB=111)[source]

returns C’

This function computes the matrix-matrix product and sum M{C’ = S{alpha} op(A) op(B) + S{beta} C} where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans and similarly for the parameter TransB.

pygsl.blas.dgemv(alpha, a, x, beta, y, TransA=111)[source]

This function computes the matrix-vector product and sum M{y = S{alpha} op(A) x + S{beta} y}, where op(A) = M{A, A^T, A^H} for TransA = CblasNoTrans, CblasTrans, CblasConjTrans.

pygsl.blas.dger(alpha, X, Y, A)[source]

returns A’

This function computes the rank-1 update M{A’ = S{alpha} x y^T + A} of the matrix A.

pygsl.blas.dnrm2(x)[source]

This function computes the Euclidean norm M{||x||_2 = sqrt {sum x_i^2}} of the vector x.

pygsl.blas.drot(x, y, c, s)[source]

This function applies a Givens rotation M{(x’, y’) = (c x + s y, -s x + c y)} to the vectors x, y.

pygsl.blas.drot_cr(x_CR, y_CR, c, s)[source]

This function applies a Givens rotation M{(x’, y’) = (c x + s y, -s x + c y)} to the vectors x, y.

pygsl.blas.dsymm(alpha, A, B, beta, C, Side=141, Uplo=122)[source]

returns C’

This function computes the matrix-matrix product and sum M{C’ = S{alpha} A B + S{beta} C} for Side is CblasLeft and M{C’ = S{alpha} B A + S{beta} C} for Side is CblasRight, where the matrix A is symmetric. When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.

pygsl.blas.dsymv(alpha, A, X, beta, Y, Uplo=122)[source]

returns y’

This function computes the matrix-vector product and sum M{y’ = S{alpha} A x + S{beta} y} for the symmetric matrix A. Since the matrix A is symmetric only its upper half or lower half need to be stored. When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.

pygsl.blas.dsyr(alpha, X, A, Uplo=122)[source]

returns A’

This function computes the symmetric rank-1 update M{A’ = S{alpha} x x^T + A} of the symmetric matrix A. Since the matrix A is symmetric only its upper half or lower half need to be stored. When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.

pygsl.blas.dsyr2(alpha, X, Y, A, Uplo=122)[source]

returns A’

This function computes the symmetric rank-2 update M{A’ = S{alpha} x y^T + S{alpha} y x^T + A} of the symmetric matrix A. Since the matrix A is symmetric only its upper half or lower half need to be stored. When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.

pygsl.blas.dsyr2k(alpha, A, B, beta, C, Uplo=122, Trans=111)[source]

returns C’

This function computes a rank-2k update of the symmetric matrix C, M{C’ = S{alpha} A B^T + S{alpha} B A^T + S{beta} C} when Trans is CblasNoTrans and M{C’ = S{alpha} A^T B + S{alpha} B^T A + S{beta} C} when Trans is CblasTrans. Since the matrix C is symmetric only its upper half or lower half need to be stored. When Uplo is CblasUpper then the upper triangle and diagonal of C are used, and when Uplo is CblasLower then the lower triangle and diagonal of C are used.

pygsl.blas.dsyrk(alpha, A, beta, C, Uplo=122, Trans=111)[source]

returns C’

This function computes a rank-k update of the symmetric matrix C, M{C’ = S{alpha} A A^T + S{beta} C} when Trans is CblasNoTrans and M{C’ = S{alpha} A^T A + S{beta} C} when Trans is CblasTrans. Since the matrix C is symmetric only its upper half or lower half need to be stored. When Uplo is CblasUpper then the upper triangle and diagonal of C are used, and when Uplo is CblasLower then the lower triangle and diagonal of C are used.

pygsl.blas.dtrmm(alpha, A, B, Side=141, Uplo=122, TransA=111, Diag=131)[source]

returns B’

This function computes the matrix-matrix product M{B’ = S{alpha} op(A) B} for Side is CblasLeft and M{B’ = S{alpha} B op(A)} for Side is CblasRight. The matrix A is triangular and op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans When Uplo is CblasUpper then the upper triangle of A is used, and when Uplo is CblasLower then the lower triangle of A is used. If Diag is CblasNonUnit then the diagonal of A is used, but if Diag is CblasUnit then the diagonal elements of the matrix A are taken as unity and are not referenced.

pygsl.blas.dtrmv(A, x, Uplo=122, TransA=111, Diag=131)[source]

This function computes the matrix-vector product returns x’

This function computes the matrix-vector product and x’ = op(A) x for the triangular matrix A, where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans. When Uplo is CblasUpper then the upper triangle of A is used, and when Uplo is CblasLower then the lower triangle of A is used. If Diag is CblasNonUnit then the diagonal of the matrix is used, but if Diag is CblasUnit then the diagonal elements of the matrix A are taken as unity and are not referenced.

pygsl.blas.dtrsm(alpha, A, B, Side=141, Uplo=122, TransA=111, Diag=131)[source]

returns B’

This function computes the matrix-matrix product M{B’ = S{alpha} op(inv(A)) B} for Side is CblasLeft and M{B’ = S{alpha} B op(inv(A))} for Side is CblasRight. The matrix A is triangular and op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans When Uplo is CblasUpper then the upper triangle of A is used, and when Uplo is CblasLower then the lower triangle of A is used. If Diag is CblasNonUnit then the diagonal of A is used, but if Diag is CblasUnit then the diagonal elements of the matrix A are taken as unity and are not referenced.

pygsl.blas.dtrsv(A, x, Uplo=122, TransA=111, Diag=131)[source]

This function computes inv(op(A)) x for x, where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans. When Uplo is CblasUpper then the upper triangle of A is used, and when Uplo is CblasLower then the lower triangle of A is used. If Diag is CblasNonUnit then the diagonal of the matrix is used, but if Diag is CblasUnit then the diagonal elements of the matrix A are taken as unity and are not referenced.

Return type:

x

pygsl.blas.dzasum(x)[source]

This function computes the absolute sum M{sum |\Re(x_i)| + |\Im(x_i)|} of the elements of the vector x.

pygsl.blas.dznrm2(x)[source]

This function computes the Euclidean norm of the complex vector x, M{||x||_2 = sqrt {sum (Re(x_i)^2 + Im(x_i)^2)}}.

pygsl.blas.idamax(x)[source]

This function returns the index of the largest element of the vector x. The largest element is determined by its absolute magnitude. If the largest value occurs several times then the index of the first occurrence is returned.

pygsl.blas.izamax(x)[source]

This function returns the index of the largest element of the vector x. The largest element is determined by the sum of the magnitudes of the real and imaginary parts M{|\Re(x_i)| + |\Im(x_i)|}. If the largest value occurs several times then the index of the first occurrence is returned.

pygsl.blas.triang2herm(A, Uplo=122, Diag=131)[source]

returns A’

This function creates an hermitian matrix from a triangular matrix. When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used. If Diag is CblasNonUnit then the diagonal of A is used, but if Diag is CblasUnit then the diagonal elements of the matrix A are taken as unity and are not referenced.

pygsl.blas.triang2symm(A, Uplo=122, Diag=131)[source]

returns A’

This function creates an symmetric matrix from a triangular matrix. When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used. If Diag is CblasNonUnit then the diagonal of A is used, but if Diag is CblasUnit then the diagonal elements of the matrix A are taken as unity and are not referenced.

pygsl.blas.zaxpy(alpha, x, y)[source]

This function computes the sum M{y = S{alpha} x + y} for the vectors x and y.

pygsl.blas.zaxpy_cr(alpha, x, y_CR)[source]

This function computes the sum M{y = S{alpha} x + y} for the vectors x and y.

pygsl.blas.zdotc(x, y)[source]

This function computes the complex conjugate scalar product M{x^H y} for the vectors x and y, returning the result.

pygsl.blas.zdotu(x, y)[source]

This function computes the complex scalar product M{x^T y} for the vectors x and y, returning the result.

pygsl.blas.zgemm(alpha, A, B, beta, C, TransA=111, TransB=111)[source]

returns C’

This function computes the matrix-matrix product and sum M{C’ = S{alpha} op(A) op(B) + S{beta} C} where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans and similarly for the parameter TransB.

pygsl.blas.zgemv(alpha, a, x, beta, y, TransA=111)[source]

This function computes the matrix-vector product and sum M{y = S{alpha} op(A) x + S{beta} y}, where M{op(A) = A, A^T, A^H} for TransA = CblasNoTrans, CblasTrans, CblasConjTrans.

pygsl.blas.zgerc(alpha, X, Y, A)[source]

returns A’

This function computes the conjugate rank-1 update M{A = S{alpha} x y^H + A} of the matrix A.

pygsl.blas.zgeru(alpha, X, Y, A)[source]

returns A’

This function computes the rank-1 update M{A’ = S{alpha} x y^T + A} of the matrix A.

pygsl.blas.zhemm(alpha, A, B, beta, C, Side=141, Uplo=122)[source]

returns C’

This function computes the matrix-matrix product and sum M{C’ = S{alpha} A B + S{beta} C} for Side is CblasLeft and M{C’ = S{alpha} B A + S{beta} C} for Side is CblasRight, where the matrix A is hermitian. When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used. The imaginary elements of the diagonal are automatically set to zero.

pygsl.blas.zhemv(alpha, A, X, beta, Y, Uplo=122)[source]

returns y’

This function computes the matrix-vector product and sum M{y’ = S{alpha} A x + S{beta} y} for the hermitian matrix A. Since the matrix A is hermitian only its upper half or lower half need to be stored. When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used. The imaginary elements of the diagonal are automatically assumed to be zero and are not referenced.

pygsl.blas.zher(alpha, X, A, Uplo=122)[source]

returns A’

This function computes the hermitian rank-1 update M{A’ = S{alpha} x x^H + A} of the hermitian matrix A. Since the matrix A is hermitian only its upper half or lower half need to be stored. When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used. The imaginary elements of the diagonal are automatically set to zero.

pygsl.blas.zher2(alpha, X, Y, A, Uplo=122)[source]

returns A’

This function computes the hermitian rank-2 update M{A’ = S{alpha} x y^H + S{alpha}^* y x^H A} of the hermitian matrix A. Since the matrix A is hermitian only its upper half or lower half need to be stored. When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used. The imaginary elements of the diagonal are automatically set to zero.

pygsl.blas.zher2k(alpha, A, B, beta, C, Uplo=122, Trans=111)[source]

returns C’

This function computes a rank-2k update of the hermitian matrix C, M{C’ = S{alpha} A B^H + S{alpha}^* B A^H + S{beta} C} when Trans is CblasNoTrans and M{C’ = S{alpha} A^H B + S{alpha}^* B^H A + S{beta} C} when Trans is CblasTrans. Since the matrix C is hermitian only its upper half or lower half need to be stored. When Uplo is CblasUpper then the upper triangle and diagonal of C are used, and when Uplo is CblasLower then the lower triangle and diagonal of C are used. The imaginary elements of the diagonal are automatically set to zero.

Calls function:

pygsl.blas.zherk(alpha, A, beta, C, Uplo=122, Trans=111)[source]

returns C’

This function computes a rank-k update of the hermitian matrix C, M{C’ = S{alpha} A A^H + S{beta} C} when Trans is CblasNoTrans and M{C’ = S{alpha} A^H A + S{beta} C} when Trans is CblasTrans. Since the matrix C is hermitian only its upper half or lower half need to be stored. When Uplo is CblasUpper then the upper triangle and diagonal of C are used, and when Uplo is CblasLower then the lower triangle and diagonal of C are used. The imaginary elements of the diagonal are automatically set to zero.

pygsl.blas.zsymm(alpha, A, B, beta, C, Side=141, Uplo=122)[source]

returns C’

This function computes the matrix-matrix product and sum M{C’ = S{alpha} A B + S{beta} C} for Side is CblasLeft and M{C’ = S{alpha} B A + S{beta} C} for Side is CblasRight, where the matrix A is symmetric. When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.

pygsl.blas.zsyr2k(alpha, A, B, beta, C, Uplo=122, Trans=111)[source]

returns C’

This function computes a rank-2k update of the symmetric matrix C, M{C’ = S{alpha} A B^T + S{alpha} B A^T + S{beta} C} when Trans is CblasNoTrans and M{C’ = S{alpha} A^T B + S{alpha} B^T A + S{beta} C} when Trans is CblasTrans. Since the matrix C is symmetric only its upper half or lower half need to be stored. When Uplo is CblasUpper then the upper triangle and diagonal of C are used, and when Uplo is CblasLower then the lower triangle and diagonal of C are used.

pygsl.blas.zsyrk(alpha, A, beta, C, Uplo=122, Trans=111)[source]

returns C’

This function computes a rank-k update of the symmetric matrix C, M{C’ = S{alpha} A A^T + S{beta} C} when Trans is CblasNoTrans and M{C’ = S{alpha} A^T A + S{beta} C} when Trans is CblasTrans. Since the matrix C is symmetric only its upper half or lower half need to be stored. When Uplo is CblasUpper then the upper triangle and diagonal of C are used, and when Uplo is CblasLower then the lower triangle and diagonal of C are used.

pygsl.blas.ztrmm(alpha, A, B, Side=141, Uplo=122, TransA=111, Diag=131)[source]

returns B’

This function computes the matrix-matrix product M{B’ = S{alpha} op(A) B} for Side is CblasLeft and M{B’ = S{alpha} B op(A)} for Side is CblasRight. The matrix A is triangular and op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans When Uplo is CblasUpper then the upper triangle of A is used, and when Uplo is CblasLower then the lower triangle of A is used. If Diag is CblasNonUnit then the diagonal of A is used, but if Diag is CblasUnit then the diagonal elements of the matrix A are taken as unity and are not referenced.

pygsl.blas.ztrmv(A, x, Uplo=122, TransA=111, Diag=131)[source]

returns x’

This function computes the matrix-vector product and x’ = op(A) x for the triangular matrix A, where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans. When Uplo is CblasUpper then the upper triangle of A is used, and when Uplo is CblasLower then the lower triangle of A is used. If Diag is CblasNonUnit then the diagonal of the matrix is used, but if Diag is CblasUnit then the diagonal elements of the matrix A are taken as unity and are not referenced.

pygsl.blas.ztrsm(alpha, A, B, Side=141, Uplo=122, TransA=111, Diag=131)[source]
Returns:

\(B'\)

This function computes the matrix-matrix product M{B’ = S{alpha} op(inv(A)) B} for Side is CblasLeft and M{B’ = S{alpha} B op(inv(A))} for Side is CblasRight. The matrix A is triangular and op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans When Uplo is CblasUpper then the upper triangle of A is used, and when Uplo is CblasLower then the lower triangle of A is used. If Diag is CblasNonUnit then the diagonal of A is used, but if Diag is CblasUnit then the diagonal elements of the matrix A are taken as unity and are not referenced.

pygsl.blas.ztrsv(A, x, Uplo=122, TransA=111, Diag=131)[source]

returns x’

This function computes inv(op(A)) x for x, where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans. When Uplo is CblasUpper then the upper triangle of A is used, and when Uplo is CblasLower then the lower triangle of A is used. If Diag is CblasNonUnit then the diagonal of the matrix is used, but if Diag is CblasUnit then the diagonal elements of the matrix A are taken as unity and are not referenced.

linalg

Functions for solving linear systems.

The library provides simple linear algebra operations which operate directly on the gsl_vector and gsl_matrix objects. These are intended for use with “small” systems where simple algorithms are acceptable.

Anyone interested in large systems will want to use the sophisticated routines found in LAPACK. The Fortran version of LAPACK is recommended as the standard package for linear algebra. It supports blocked algorithms, specialized data representations and other optimizations.

pygsl.linalg.HH_solve(A, b)[source]

returns x

This function solves the system A x = b directly using Householder transformations. On output the solution is stored in x and b is not modified.

pygsl.linalg.LU_decomp(A)[source]

returns (LU, P, signum)

This function factorizes the square matrix A into the LU decomposition PA = LU. On output the diagonal and upper triangular part of the return matrix contain the matrix U. The lower triangular part of the input matrix (excluding the diagonal) contains L. The diagonal elements of L are unity, and are not stored.

The permutation matrix P is encoded in the permutation p. The j-th column of the matrix P is given by the k-th column of the identity matrix, where k = p_j the j-th element of the permutation vector. The sign of the permutation is given by signum. It has the value (-1)^n, where n is the number of interchanges in the permutation.

The algorithm used in the decomposition is Gaussian Elimination with partial pivoting (Golub & Van Loan, Matrix Computations, Algorithm 3.4.1).

Todo

Check if creating a copy of array A is required

pygsl.linalg.LU_det(LU, signum)[source]

returns determinant

This function computes the determinant of a matrix A from its LU decomposition, LU. The determinant is computed as the product of the diagonal elements of U and the sign of the row permutation signum.

pygsl.linalg.LU_invert(LU, p)[source]

returns inverse

This function computes the inverse of a matrix A from its LU decomposition (LU,p), storing the result in the matrix inverse. The inverse is computed by solving the system A x = b for each column of the identity matrix. It is preferable to avoid direct computation of the inverse whenever possible.

pygsl.linalg.LU_lndet(LU)[source]

This function computes the logarithm of the absolute value of the determinant of a matrix A, ln|det(A)|, from its LU decomposition, LU. This function may be useful if the direct computation of the determinant would overflow or underflow.

pygsl.linalg.LU_refine(A, LU, p, b, x)[source]

returns (x, residual)

This functions applies an iterative improvement to x, the solution of A x = b, using the LU decomposition of A into (LU,p). The initial residual r = A x - b is also computed and stored in residual.

pygsl.linalg.LU_sgndet(LU, signum)[source]

This function computes the sign or phase factor of the determinant of a matrix A, det(A)/|det(A)|, from its LU decomposition, LU.

pygsl.linalg.LU_solve(LU, p, b)[source]

This function solves the system A x = b using the LU decomposition of A into (LU, p) given by LU_decomp.

pygsl.linalg.LU_unpack(LU)[source]

returns (L,U)

This function splits the matrix LU into the the upper matrix U and the lower matrix L. The diagonal of L is the identity.

pygsl.linalg.QR_QRsolve(Q, R, b)[source]

returns x

This function solves the system R x = Q^T b for x. It can be used when the QR decomposition of a matrix is available in unpacked form as (Q,R).

pygsl.linalg.QR_QTvec(QR, tau, v)[source]

returns v’

This function applies the matrix Q^T encoded in the decomposition (QR,tau) to the vector v, storing the result Q^T v in v’. The matrix multiplication is carried out directly using the encoding of the Householder vectors without needing to form the full matrix Q^T.

pygsl.linalg.QR_Qvec(QR, tau, v)[source]

returns v’

This function applies the matrix Q encoded in the decomposition (QR,tau) to the vector v, storing the result Q v in v’. The matrix multiplication is carried out directly using the encoding of the Householder vectors without needing to form the full matrix Q.

pygsl.linalg.QR_Rsolve(QR, b)[source]

returns x

This function solves the triangular system R x = b for x. It may be useful if the product b’ = Q^T b has already been computed using gsl.linalg.QR_QTvec.

pygsl.linalg.QR_decomp(A)[source]

returns (QR, tau)

Function: int gsl_linalg_QR_decomp (gsl_matrix * A, gsl_vector * tau) This function factorizes the M-by-N matrix A into the QR decomposition A = Q R. On output the diagonal and upper triangular part of the input matrix contain the matrix R. The vector tau and the columns of the lower triangular part of the matrix QR contain the Householder coefficients and Householder vectors which encode the orthogonal matrix Q. The vector tau must be of length k=min(M,N). The matrix Q is related to these components by, Q = Q_k … Q_2 Q_1 where Q_i = I - tau_i v_i v_i^T and v_i is the Householder vector v_i = (0,…,1,A(i+1,i),A(i+2,i),…,A(m,i)). This is the same storage scheme as used by LAPACK.

The algorithm used to perform the decomposition is Householder QR (Golub & Van Loan, Matrix Computations, Algorithm 5.2.1).

pygsl.linalg.QR_lssolve(QR, tau, b)[source]

returns (x, residual)

This function finds the least squares solution to the overdetermined system A x = b where the matrix A has more rows than columns. The least squares solution minimizes the Euclidean norm of the residual, ||Ax - b||. The routine uses the QR decomposition of A into (QR, tau) given by gsl_linalg_QR_decomp. The solution is returned in x. The residual is computed as a by-product and stored in residual.

pygsl.linalg.QR_solve(QR, tau, b)[source]

returns x

This function solves the system A x = b using the QR decomposition of A into (QR, tau) given by gsl_linalg_QR_decomp.

pygsl.linalg.QR_unpack(QR, tau)[source]

returns (Q, R)

This function unpacks the encoded QR decomposition (QR,tau) into the matrices Q and R, where Q is M-by-M and R is M-by-N.

pygsl.linalg.QR_update(Q, R, w, v)[source]

This function performs a rank-1 update w v^T of the QR decomposition (Q, R). The update is given by Q’R’ = Q R + w v^T where the output matrices Q’ and R’ are also orthogonal and right triangular. Note that Q and R are overwritten with Q’ and R’!

pygsl.linalg.R_solve(R, b)[source]

returns x

This function solves the triangular system R x = b for the N-by-N matrix R.

pygsl.linalg.SV_decomp(A)[source]

returns (U, V, S)

This function factorizes the M-by-N matrix A into the singular value decomposition A = U S V^T. The diagonal elements of the singular value matrix S are stored in the vector S. The singular values are non-negative and form a non-increasing sequence from S_1 to S_N. The matrix V contains the elements of V in untransposed form. To form the product U S V^T it is necessary to take the transpose of V. A workspace of length N is required in work.

This routine uses the Golub-Reinsch SVD algorithm.

pygsl.linalg.SV_decomp_jacobi(A)[source]

returns (u, v, s)

This function computes the SVD using one-sided Jacobi orthogonalization (see references for details). The Jacobi method can compute singular values to higher relative accuracy than Golub-Reinsch algorithms.

pygsl.linalg.SV_decomp_mod(A)[source]

returns (u, v, s)

This function computes the SVD using the modified Golub-Reinsch algorithm, which is faster for M>>N. It requires the vector work and the N-by-N matrix X as additional working space.

pygsl.linalg.SV_solve(U, V, S, b)[source]

returns x

This function solves the system A x = b using the singular value decomposition (U, S, V) of A given by gsl_linalg_SV_decomp.

Only non-zero singular values are used in computing the solution. The parts of the solution corresponding to singular values of zero are ignored. Other singular values can be edited out by setting them to zero before calling this function.

In the over-determined case where A has more rows than columns the system is solved in the least squares sense, returning the solution x which minimizes ||A x - b||_2.

pygsl.linalg.bidiag_decomp(A)[source]

returns (BUV, tau_U, tau_V)

This function factorizes the M-by-N matrix A into bidiagonal form U B V^T. The diagonal and superdiagonal of the matrix B are stored in the diagonal and superdiagonal of BUV. The orthogonal matrices U and V are stored as compressed Householder vectors in the remaining elements of BUV. The Householder coefficients are stored in the vectors tau_U and tau_V. The length of tau_U must equal the number of elements in the diagonal of A and the length of tau_V should be one element shorter.

pygsl.linalg.bidiag_unpack(A, tau_U, tau_V)[source]

returns (U, V, diag, superdiag)

This function unpacks the bidiagonal decomposition of A given by gsl.linalg.bidiag_decomp, (A, tau_U, tau_V) into the separate orthogonal matrices U, V and the diagonal vector diag and superdiagonal superdiag.

pygsl.linalg.bidiag_unpack_B(A)[source]

returns (diag, superdiag)

This function unpacks the diagonal and superdiagonal of the bidiagonal decomposition of A given by gsl_linalg_bidiag_decomp, into the diagonal vector diag and superdiagonal vector superdiag.

pygsl.linalg.bidiag_unpack_diag(diag, superdiag)[source]

returns B

This functions unpacks the bidiagonal matrix T of the diagonal and superdiagonal obtained from gsl_linalg_bidiag_unpack[_B]

pygsl.linalg.cholesky_decomp(A)[source]

Function: int gsl_linalg_cholesky_decomp (gsl_matrix * A)

This function factorizes the positive-definite square matrix A into the Cholesky decomposition A = L L^T. On output the diagonal and lower triangular part of the input matrix A contain the matrix L. The upper triangular part of the input matrix contains L^T, the diagonal terms being identical for both L and L^T. If the matrix is not positive-definite then the decomposition will fail, returning the error code GSL_EDOM.

pygsl.linalg.cholesky_solve(cholesky, b)[source]

returns x

This function solves the system A x = b using the Cholesky decomposition of A into the matrix cholesky given by cholesky_decomp.

pygsl.linalg.cholesky_unpack(L)[source]

returns (L, L^T)

This function splits the matrix L into the the upper matrix L^T and the lower matrix L. The diagonal of L is the identical for both.

pygsl.linalg.hermtd_decomp(A)[source]

returns (QT, tau)

This function factorizes the hermitian matrix A into the symmetric tridiagonal decomposition U T U^T. On output the real parts of the diagonal and subdiagonal part of the input matrix A contain the tridiagonal matrix T. The remaining lower triangular part of the input matrix contains the Householder vectors which, together with the Householder coefficients tau, encode the orthogonal matrix Q. This storage scheme is the same as used by LAPACK. The upper triangular part of A and imaginary parts of the diagonal are not referenced.

pygsl.linalg.hermtd_unpack(A, tau)[source]

returns (Q, diag, subdiag)

This function unpacks the encoded tridiagonal decomposition (A, tau) obtained from gsl_linalg_hermtd_decomp into the unitary matrix U, the real vector of diagonal elements diag and the real vector of subdiagonal elements subdiag.

pygsl.linalg.hermtd_unpack_diag(diag, subdiag)[source]

returns T

This functions unpacks the tridiagonal matrix T of the diagonal and subdiagonal obtained from gsl_linalg_hermtd_unpack[_T]

pygsl.linalg.solve_symm_cyc_tridiag(diag, e, b)[source]

returns x

This function solves the general N-by-N system A x = b where A is symmetric cyclic tridiagonal. The form of A for the 4-by-4 case is shown below,

A = ( d_0 e_0 e_3 )

( e_0 d_1 e_1 ) ( e_1 d_2 e_2 ) ( e_3 e_2 d_3 )

pygsl.linalg.solve_symm_tridiag(diag, e, b)[source]

returns x

This function solves the general N-by-N system A x = b where A is symmetric tridiagonal. The form of A for the 4-by-4 case is shown below,

A = ( d_0 e_0 )

( e_0 d_1 e_1 ) ( e_1 d_2 e_2 ) ( e_2 d_3 )

pygsl.linalg.solve_tridiag(diag, e, f, b)[source]

returns x

This function solves the general N-by-N system A x = b where A is tridiagonal. The form of A for the 4-by-4 case is shown below,

A = ( d_0 e_0 )

( f_0 d_1 e_1 ) ( f_1 d_2 e_2 ) ( f_2 d_3 )

pygsl.linalg.symmtd_decomp(A)[source]

returns (QT, tau)

This function factorizes the symmetric square matrix A into the symmetric tridiagonal decomposition Q T Q^T. On output the diagonal and subdiagonal part of the input matrix A contain the tridiagonal matrix T. The remaining lower triangular part of the input matrix contains the Householder vectors which, together with the Householder coefficients tau, encode the orthogonal matrix Q. This storage scheme is the same as used by LAPACK. The upper triangular part of A is not referenced.

pygsl.linalg.symmtd_unpack(A, tau)[source]

returns (Q, diag, subdiag)

This function unpacks the encoded symmetric tridiagonal decomposition (A, tau) obtained from gsl_linalg_symmtd_decomp into the orthogonal matrix Q, the vector of diagonal elements diag and the vector of subdiagonal elements subdiag.

pygsl.linalg.symmtd_unpack_T(A)[source]

returns (diag, subdiag)

This function unpacks the diagonal and subdiagonal of the encoded tridiagonal decomposition (A, tau) obtained from gsl_linalg_hermtd_decomp into the real vectors diag and subdiag.

pygsl.linalg.symmtd_unpack_diag(diag, subdiag)[source]

returns T

This functions unpacks the tridiagonal matrix T of the diagonal and subdiagonal obtained from gsl_linalg_symmtd_unpack[_T]

eigen

This module provides functions for computing eigenvalues and eigenvectors of matrices using the gsl.

There are routines for real symmetric and complex hermitian matrices, and eigenvalues can be computed with or without eigenvectors. The algorithms used are symmetric bidiagonalization followed by QR reduction.

These routines are intended for “small” systems where simple algorithms are acceptable. Anyone interested finding eigenvalues and eigenvectors of large matrices will want to use the sophisticated routines found in LAPACK. The Fortran version of LAPACK is recommended as the standard package for linear algebra.

pygsl.eigen.Heigenvalues(a, ws=None) eval[source]

This function computes the eigenvalues of the complex hermitian matrix a. The imaginary parts of the diagonal are assumed to be zero and are not referenced. The eigenvalues are stored in the vector eval and are unordered.

pygsl.eigen.Heigenvectors(a, ws=None)[source]

This function computes the eigenvalues and eigenvectors of the complex hermitian matrix A.The imaginary parts of the diagonal are assumed to be zero and are not referenced. The eigenvalues are stored in the vector eval and are unordered. The corresponding complex eigenvectors are stored in the columns of the matrix evec. For example, the eigenvector in the first column corresponds to the first eigenvalue. The eigenvectors are guaranteed to be mutually orthogonal and normalised to unit magnitude.

pygsl.eigen.eigenvalues(a, ws=None) array[source]

This function computes the eigenvalues of the real symmetric matrix a. The eigenvalues are returned as NumPy array and are unordered.

pygsl.eigen.eigenvectors(a, ws=None)[source]

This function computes the eigenvalues and eigenvectors of the real symmetric matrix a. The eigenvalues are stored in the vector eval and are unordered. The corresponding eigenvectors are stored in the columns of the matrix evec. For example, the eigenvector in the first column corresponds to the first eigenvalue. The eigenvectors are

guaranteed to be mutually orthogonal and normalised to unit magnitude.

fft

Wrapper for the FFT tranform as provided by GSL

pygsl.fft.complex_backward()

Complex backward transform

The output is not scaled! :param data: an array of complex numbers :param space: a workspace of approbriate type and size :param table: a wavetable of approbriate type and size :param output: array to store the output into. GSL computes the FFT

in place. So if this array is provided, the wrapper will use this array as output array. If the input and output array are identical no internal copy will be made. This works only for the complex transform types!

Optional objects will be generated by the function automatically if required

pygsl.fft.complex_forward()

Complex forward transform :param data: an array of complex numbers :param space: a workspace of approbriate type and size :param table: a wavetable of approbriate type and size :param output: array to store the output into. GSL computes the FFT

in place. So if this array is provided, the wrapper will use this array as output array. If the input and output array are identical no internal copy will be made. This works only for the complex transform types!

Optional objects will be generated by the function automatically if required

pygsl.fft.complex_backward_float()

Float Version. See the corresponding double version. Remove the trailing _float

pygsl.fft.complex_forward_float()

Float Version. See the corresponding double version. Remove the trailing _float

pygsl.fft.complex_inverse()

Complex inverse transform

The output is to scale. :param data: an array of complex numbers :param space: a workspace of approbriate type and size :param table: a wavetable of approbriate type and size :param output: array to store the output into. GSL computes the FFT

in place. So if this array is provided, the wrapper will use this array as output array. If the input and output array are identical no internal copy will be made. This works only for the complex transform types!

Optional objects will be generated by the function automatically if required

pygsl.fft.complex_inverse_float()

Float Version. See the corresponding double version. Remove the trailing _float

pygsl.fft.complex_radix2_backward()

Complex backward radix2 transform

The output is not scaled! :param data: an array of complex numbers :param output: array to store the output into. GSL computes the FFT

in place. So if this array is provided, the wrapper will use this array as output array. If the input and output array are identical no internal copy will be made. This works only for the complex transform types!

Optional objects will be generated by the function automatically if required

pygsl.fft.complex_radix2_backward_float()

Float Version. See the corresponding double version. Remove the trailing _float

pygsl.fft.complex_radix2_dif_backward()

Complex backward radix2 decimation-in-frequency transform

The output is not scaled! :param data: an array of complex numbers :param output: array to store the output into. GSL computes the FFT

in place. So if this array is provided, the wrapper will use this array as output array. If the input and output array are identical no internal copy will be made. This works only for the complex transform types!

Optional objects will be generated by the function automatically if required

pygsl.fft.complex_radix2_dif_backward_float()

Float Version. See the corresponding double version. Remove the trailing _float

pygsl.fft.complex_radix2_dif_forward()

Complex forward radix2 decimation-in-frequency transform :param data: an array of complex numbers :param output: array to store the output into. GSL computes the FFT

in place. So if this array is provided, the wrapper will use this array as output array. If the input and output array are identical no internal copy will be made. This works only for the complex transform types!

Optional objects will be generated by the function automatically if required

pygsl.fft.complex_radix2_dif_forward_float()

Float Version. See the corresponding double version. Remove the trailing _float

pygsl.fft.complex_radix2_dif_inverse()

Complex inverse radix2 decimation-in-frequency transform

The output is to scale. :param data: an array of complex numbers :param output: array to store the output into. GSL computes the FFT

in place. So if this array is provided, the wrapper will use this array as output array. If the input and output array are identical no internal copy will be made. This works only for the complex transform types!

Optional objects will be generated by the function automatically if required

pygsl.fft.complex_radix2_dif_inverse_float()

Float Version. See the corresponding double version. Remove the trailing _float

pygsl.fft.complex_radix2_forward()

Complex forward radix2 transform :param data: an array of complex numbers :param output: array to store the output into. GSL computes the FFT

in place. So if this array is provided, the wrapper will use this array as output array. If the input and output array are identical no internal copy will be made. This works only for the complex transform types!

Optional objects will be generated by the function automatically if required

pygsl.fft.complex_radix2_forward_float()

Float Version. See the corresponding double version. Remove the trailing _float

pygsl.fft.complex_radix2_inverse()

Complex inverse radix2 transform

The output is to scale. :param data: an array of complex numbers :param output: array to store the output into. GSL computes the FFT

in place. So if this array is provided, the wrapper will use this array as output array. If the input and output array are identical no internal copy will be made. This works only for the complex transform types!

Optional objects will be generated by the function automatically if required

pygsl.fft.complex_radix2_inverse_float()

Float Version. See the corresponding double version. Remove the trailing _float

pygsl.fft.halfcomplex_inverse()

Half complex inverse :param data: an array of complex numbers :param n: length of the real array. From the complex input I can not

compute the original length if it was odd or even. Thus I allow to give the input here. If not given the routine will guess the input length. If the last imaginary part is zero it will assume an real output array of even length

Parameters:
  • space – a workspace of approbriate type and size

  • table – a wavetable of approbriate type and size

  • eps – epsilon to use in the comparisons (default 1e-8)

If arguments objects are not provided, they will be generated by the function automatically.

pygsl.fft.halfcomplex_inverse_float()

Float Version. See the corresponding double version. Remove the trailing _float

pygsl.fft.halfcomplex_radix2_inverse()

Half complex radix2 inverse :param data: an array of real data containing the complex data

as required by this transform. See the GSL Reference Document

pygsl.fft.halfcomplex_radix2_inverse_float()

Float Version. See the corresponding double version. Remove the trailing _float

pygsl.fft.halfcomplex_radix2_transform()

Half complex radix2 transform

The output is not scaled! :param data: an array of real data containing the complex data

as required by this transform. See the GSL Reference Document

pygsl.fft.halfcomplex_radix2_transform_float()

Float Version. See the corresponding double version. Remove the trailing _float

pygsl.fft.halfcomplex_radix2_unpack()

Unpack the frequency data from the output of a real radix 2 transform to an approbriate complex array.

pygsl.fft.halfcomplex_radix2_unpack_float()

Float Version. See the corresponding double version. Remove the trailing _float

pygsl.fft.halfcomplex_transform()

Half complex transform

The output is not scaled! :param data: an array of complex numbers :param n: length of the real array. From the complex input I can not

compute the original length if it was odd or even. Thus I allow to give the input here. If not given the routine will guess the input length. If the last imaginary part is zero it will assume an real output array of even length

Parameters:
  • space – a workspace of approbriate type and size

  • table – a wavetable of approbriate type and size

  • eps – epsilon to use in the comparisons (default 1e-8)

If arguments objects are not provided, they will be generated by the function automatically.

pygsl.fft.halfcomplex_transform_float()

Float Version. See the corresponding double version. Remove the trailing _float

pygsl.fft.halfcomplex_wavetable()

Half Complex Wavetable

Stores the precomputed trigonometric functions

Parameters:

n – Length of the data to transform

pygsl.fft.halfcomplex_wavetable_float()

Half Complex Wavetable

Stores the precomputed trigonometric functions

Parameters:

n – Length of the data to transform

pygsl.fft.real_radix2_transform()

Real radix2 transform :param data: an array of real numbers

Returns:

the transformed data in its special storage. Halfcomplex data in an real array. Use halfcomplex_radix2_unpack() to transform it into an approbriate complex array.

pygsl.fft.real_radix2_transform_float()

Float Version. See the corresponding double version. Remove the trailing _float

pygsl.fft.real_transform()

Real transform :param data: an array of real numbers :param space: a workspace of approbriate type and size :param table: a wavetable of approbriate type and size :param output: array to store the output into. GSL computes the FFT

in place. So if this array is provided, the wrapper will use this array as output array. If the input and output array are identical no internal copy will be made. This works only for the complex transform types!

Optional objects will be generated by the function automatically if required

pygsl.fft.real_transform_float()

Float Version. See the corresponding double version. Remove the trailing _float

class pygsl.fft.complex_wavetable

Bases:

Complex Wavetable

Stores the precomputed trigonometric functions

Parameters:

n – Length of the data to transform

class pygsl.fft.complex_wavetable_float

Bases:

Complex Wavetable

Stores the precomputed trigonometric functions

Parameters:

n – Length of the data to transform

class pygsl.fft.complex_workspace

Bases:

Complex Workspace

Needed as working space for mixed radix routines.

Parameters:

n – Length of the data to transform

class pygsl.fft.complex_workspace_float

Bases:

Complex Workspace

Needed as working space for mixed radix routines.

Parameters:

n – Length of the data to transform

class pygsl.fft.real_wavetable

Bases:

Real Wavetable

Stores the precomputed trigonometric functions

Parameters:

n – Length of the data to transform

class pygsl.fft.real_wavetable_float

Bases:

Real Wavetable

Stores the precomputed trigonometric functions

Parameters:

n – Length of the data to transform

class pygsl.fft.real_workspace

Bases:

Real Workspace

Needed as working space for mixed radix routines.

Parameters:

n – Length of the data to transform

class pygsl.fft.real_workspace_float

Bases:

Real Workspace

Needed as working space for mixed radix routines.

Parameters:

n – Length of the data to transform

integrate

Routines for numerical integration

This modules defines routines for performing numerical integration (quadrature) of a function in one dimension. There are routines for adaptive and non-adaptive integration of general functions, with specialised routines for specific cases. These include integration over infinite and semi-infinite ranges, singular integrals, including logarithmic singularities, computation of Cauchy principal values and oscillatory integrals. The library reimplements the algorithms used in QUADPACK, a numerical integration package written by Piessens, Doncker-Kapenga, Uberhuber and Kahaner. Fortran code for QUADPACK is available on Netlib.

pygsl.integrate.qag(f, a, b, epsabs, epsrel, limit, key, workspace)[source]

The QAG algorithm is a simple adaptive integration procedure. The integration region is divided into subintervals, and on each iteration the subinterval with the largest estimated error is bisected. This reduces the overall error rapidly, as the subintervals become concentrated around local difficulties in the integrand. These subintervals are managed by a `gsl_integration_workspace’ struct, which handles the memory for the subinterval ranges, results and error estimates.

This function applies an integration rule adaptively until an estimate of the integral of f over (a,b) is achieved within the desired absolute and relative error limits, EPSABS and EPSREL. The function returns the final approximation, RESULT, and an estimate of the absolute error, ABSERR. The integration rule is determined by the value of KEY, which should be chosen from the following symbolic names,

GAUSS15 GAUSS21 GAUSS31 GAUSS41 GAUSS51 GAUSS61

corresponding to the 15, 21, 31, 41, 51 and 61 point Gauss-Kronrod rules. The higher-order rules give better accuracy for smooth functions, while lower-order rules save time when the function contains local difficulties, such as discontinuities.

On each iteration the adaptive integration strategy bisects the with the largest error estimate. The subintervals and their results are stored in the memory provided by WORKSPACE. The maximum number of subintervals is given by LIMIT, which may not exceed the allocated size of the workspace.

inputf, a, b, epsabs, epsrel, limit, key, workspace

f … gsl_function

pygsl.integrate.qagi(f, epsabs, epsrel, limit, workspace)[source]
This function computes the integral of the function F over the

infinite interval (-infty,+infty). The integral is mapped onto the interval (0,1] using the transformation x = (1-t)/t,

int_{-infty}^{+infty} dx f(x) =

int_0^1 dt (f((1-t)/t) + f((-1+t)/t))/t^2.

It is then integrated using the QAGS algorithm. The normal 21-point Gauss-Kronrod rule of QAGS is replaced by a 15-point rule, because the transformation can generate an integrable singularity at the origin. In this case a lower-order rule is more efficient.

inputf, epsabs, epsrel, limit, workspace

f … gsl_function

pygsl.integrate.qagil(f, b, epsabs, epsrel, limit, workspace)[source]
This function computes the integral of the function F over the

semi-infinite interval (-infty,b). The integral is mapped onto the region (0,1] using the transformation x = b - (1-t)/t,

int_{+infty}^{b} dx f(x) =

int_0^1 dt f(b - (1-t)/t)/t^2

and then integrated using the QAGS algorithm.

inputf, b, epsabs, epsrel, limit, workspace

f … gsl_function

pygsl.integrate.qagiu(f, a, epsabs, epsrel, limit, workspace)[source]

This function computes the integral of the function F over the semi-infinite interval (a,+infty). The integral is mapped onto the interval (0,1] using the transformation x = a + (1-t)/t,

int_{a}^{+infty} dx f(x) =

int_0^1 dt f(a + (1-t)/t)/t^2

and then integrated using the QAGS algorithm.

inputf, a, epsabs, epsrel, limit, workspace

f … gsl_function

pygsl.integrate.qagp(f, pts, epsabs, epsrel, limit, workspace)[source]

This function applies the adaptive integration algorithm QAGS taking account of the user-supplied locations of singular points. The array PTS of length NPTS should contain the endpoints of the integration ranges defined by the integration region and locations of the singularities. For example, to integrate over the region (a,b) with break-points at x_1, x_2, x_3 (where a < x_1 < x_2 < x_3 < b) the following PTS array should be used

pts[0] = a pts[1] = x_1 pts[2] = x_2 pts[3] = x_3 pts[4] = b

with NPTS = 5.

If you know the locations of the singular points in the integration region then this routine will be faster than `QAGS’.

inputf, pts, epsabs, epsrel, limit, workspace

f … gsl_function

pygsl.integrate.qags(f, a, b, epsabs, epsrel, limit, workspace)[source]
This function applies the Gauss-Kronrod 21-point integration rule

adaptively until an estimate of the integral of f over (a,b) is achieved within the desired absolute and relative error limits, EPSABS and EPSREL. The results are extrapolated using the epsilon-algorithm, which accelerates the convergence of the integral in the presence of discontinuities and integrable singularities. The function returns the final approximation from the extrapolation, RESULT, and an estimate of the absolute error, ABSERR. The subintervals and their results are stored in the memory provided by WORKSPACE. The maximum number of subintervals is given by LIMIT, which may not exceed the allocated size of the workspace.

inputf.get_ptr(), a, b, epsabs, epsrel, limit, key, workspace

f … gsl_function

pygsl.integrate.qawc(f, a, b, c, epsabs, epsrel, limit, workspace)[source]

This function computes the Cauchy principal value of the integral of f over (a,b), with a singularity at C,

I = int_a^b dx f(x) / (x - c)

The adaptive bisection algorithm of QAG is used, with modifications to ensure that subdivisions do not occur at the singular point x = c. When a subinterval contains the point x = c or is close to it then a special 25-point modified Clenshaw-Curtis rule is used to control the singularity. Further away from the singularity the algorithm uses an ordinary 15-point Gauss-Kronrod integration rule.

inputf, a, b, c, epsabs, epsrel, limit, workspace

f … gsl_function

pygsl.integrate.qawf(f, a, epsabs, limit, workspace, cycleworkspace, qwao_table)[source]

This function attempts to compute a Fourier integral of the

function F over the semi-infinite interval [a,+infty).

I = int_a^{+infty} dx f(x) sin(omega x) I = int_a^{+infty} dx f(x) cos(omega x)

The parameter omega is taken from the table WF (the length L can take any value, since it is overridden by this function to a value appropriate for the fourier integration). The integral is computed using the QAWO algorithm over each of the subintervals,

C_1 = [a, a + c] C_2 = [a + c, a + 2 c] … = … C_k = [a + (k-1) c, a + k c]

where c = (2 floor(|\omega|) + 1) pi/|\omega|. The width c is chosen to cover an odd number of periods so that the contributions from the intervals alternate in sign and are monotonically decreasing when F is positive and monotonically decreasing. The sum of this sequence of contributions is accelerated using the epsilon-algorithm.

This function works to an overall absolute tolerance of ABSERR. The following strategy is used: on each interval C_k the algorithm tries to achieve the tolerance

TOL_k = u_k abserr

where u_k = (1 - p)p^{k-1} and p = 9/10. The sum of the geometric series of contributions from each interval gives an overall tolerance of ABSERR.

If the integration of a subinterval leads to difficulties then the accuracy requirement for subsequent intervals is relaxed,

TOL_k = u_k max(abserr, max_{i<k}{E_i})

where E_k is the estimated error on the interval C_k.

The subintervals and their results are stored in the memory provided by WORKSPACE. The maximum number of subintervals is given by LIMIT, which may not exceed the allocated size of the workspace. The integration over each subinterval uses the memory provided by CYCLE_WORKSPACE as workspace for the QAWO algorithm.

inputf, a, b, qwas_table, epsabs, epsrel, limit, workspace

qwao_table

f … gsl_function

pygsl.integrate.qawo(f, a, epsabs, epsrel, limit, workspace, qwao_table)[source]
This function uses an adaptive algorithm to compute the integral of

f over (a,b) with the weight function sin(omega x) or cos(omega x) defined by the table WF.

I = int_a^b dx f(x) sin(omega x) I = int_a^b dx f(x) cos(omega x)

The results are extrapolated using the epsilon-algorithm to accelerate the convergence of the integral. The function returns the final approximation from the extrapolation, RESULT, and an estimate of the absolute error, ABSERR. The subintervals and their results are stored in the memory provided by WORKSPACE. The maximum number of subintervals is given by LIMIT, which may not exceed the allocated size of the workspace.

Those subintervals with “large” widths d, domega > 4 are computed using a 25-point Clenshaw-Curtis integration rule, which handles the oscillatory behavior. Subintervals with a “small” width domega < 4 are computed using a 15-point Gauss-Kronrod integration.

inputf, a, b, qwas_table, epsabs, epsrel, limit, workspace

qwao_table

f … gsl_function

class pygsl.integrate.qawo_table(omega, L, sine, n)[source]

Bases: _workspace

Table for qawo

This class manages space for a `qawo_table’

and its associated workspace describing a sine or cosine

weight function W(x) with the parameters (omega, L),

W(x) = sin(omega x) W(x) = cos(omega x)

The parameter L must be the length of the interval over which the function will be integrated L = b - a. The choice of sine or cosine is made with the parameter SINE which should be chosen from one of the two following symbolic values:

COSINE SINE

The `gsl_integration_qawo_table’ is a table of the trigonometric coefficients required in the integration process. The parameter N determines the number of levels of coefficients that are computed. Each level corresponds to one bisection of the interval L, so that N levels are sufficient for subintervals down to the length L/2^n. The integration routine `gsl_integration_qawo’ returns the error `GSL_ETABLE’ if the number of levels is insufficient for the requested accuracy.

input : omega, L, sine, n

set(omega, L, sine, n)[source]

Change the parameters OMEGA, L and SINE

set_length(L)[source]

Change the length parameter L

pygsl.integrate.qaws(f, a, b, qwas_table, epsabs, epsrel, limit, workspace)[source]
This function computes the integral of the function f(x) over the

interval (a,b) with the singular weight function (x-a)^alpha (b-x)^beta log^mu (x-a) log^nu (b-x). The parameters of the weight function (alpha, beta, mu, nu) are taken from the table T. The integral is,

I = int_a^b dx f(x) (x-a)^alpha (b-x)^beta log^mu (x-a) log^nu (b-x).

The adaptive bisection algorithm of QAG is used. When a subinterval contains one of the endpoints then a special 25-point modified Clenshaw-Curtis rule is used to control the singularities. For subintervals which do not include the endpoints an ordinary 15-point Gauss-Kronrod integration rule is used.

inputf, a, b, qwas_table, epsabs, epsrel, limit, workspace

f … gsl_function

class pygsl.integrate.qaws_table(alpha, beta, mu, nu)[source]

Bases: _workspace

Integration table for qaws

This class allocates space for a `gsl_integration_qaws_table’ struct and associated workspace describing a singular weight function W(x) with the parameters (alpha, beta, mu, nu),

W(x) = (x-a)^alpha (b-x)^beta log^mu (x-a) log^nu (b-x)

where alpha < -1, beta < -1, and mu = 0, 1, nu = 0, 1. The weight function can take four different forms depending on the

values of mu and nu,

W(x) = (x-a)^alpha (b-x)^beta (mu = 0, nu = 0) W(x) = (x-a)^alpha (b-x)^beta log(x-a) (mu = 1, nu = 0) W(x) = (x-a)^alpha (b-x)^beta log(b-x) (mu = 0, nu = 1) W(x) = (x-a)^alpha (b-x)^beta log(x-a) log(b-x) (mu = 1, nu = 1)

The singular points (a,b) do not have to be specified until the integral is computed, where they are the endpoints of the integration range.

The function returns a pointer to the newly allocated `gsl_integration_qaws_table’ if no errors were detected, and 0 in the case of error.

set(alpha, beta, mu, nu)[source]

This function modifies the parameters (alpha, beta, mu, nu)

input : alpha, beta, mu, nu

pygsl.integrate.qng(f, a, b, epsabs, epsrel)[source]

This function applies the Gauss-Kronrod 10-point, 21-point, 43-point and 87-point integration rules in succession until an estimate of the integral of f over (a,b) is achieved within the desired absolute and relative error limits, EPSABS and EPSREL. The function returns the final approximation, RESULT, an estimate of the absolute error, ABSERR and the number of function evaluations used, NEVAL. The Gauss-Kronrod rules are designed in such a way that each rule uses all the results of its predecessors, in order to minimize the total number of function evaluations.

inputf, a, b, epsabs, epsrel

f … gsl_function

class pygsl.integrate.workspace(size)[source]

Bases: _workspace

Workspace for integratinn

This class provides a workspace sufficient to hold N double precision intervals, their integration results and error estimates.

inputsize

size … size of the workspace

get_size()[source]

Get the size of the workspace

rng

GSL Random-number generators implemented as C extension types.

Use rng(Random-number generator types) to create an instance of a new random generator. All known random generator types are listed below. The different distributions are methods of the random generator instances. Consult the GSL manual for full details.

Random-number generator types:
  • borosh13

  • cmrg

  • coveyou

  • fishman18

  • fishman20

  • fishman2x

  • gfsr4

  • knuthran

  • knuthran2

  • lecuyer21

  • minstd

  • mrg

  • mt19937

  • mt19937_1999

  • r250

  • ran0

  • ran1

  • ran2

  • ran3

  • rand

  • rand48

  • random128_bsd

  • random128_glibc2

  • random128_libc5

  • random256_bsd

  • random256_glibc2

  • random256_libc5

  • random32_bsd

  • random32_glibc2

  • random32_libc5

  • random64_bsd

  • random64_glibc2

  • random64_libc5

  • random8_bsd

  • random8_glibc2

  • random8_libc5

  • random_bsd

  • random_glibc2

  • random_libc5

  • randu

  • ranf

  • ranlux

  • ranlux389

  • ranlxd1

  • ranlxd2

  • ranlxs0

  • ranlxs1

  • ranlxs2

  • ranmar

  • slatec

  • taus

  • taus2

  • taus113

  • transputer

  • tt800

  • uni

  • uni32

  • vax

  • waterman14

  • zuf

pygsl.rng.bernoulli_pdf()

Computes the probability density p(k) at k for the bernoulli distribution with probability parameter P. Usage: p = bernoulli_pdf(k, P)

k can be an array. In this case this function will iterate over it and

return an array of p(k).

pygsl.rng.beta_pdf()

Computes the probability density p(x) at X for the beta distribution Usage: p = beta_pdf(x, a, b)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.binomial_pdf()
Computes the probability density p(k) of obtaining K from a

binomial distribution with parameters P and N

Usage: p = binomial_pdf(k, P, N)

k can be an array. In this case this function will iterate over it and

return an array of p(k).

pygsl.rng.bivariate_gaussian_pdf()

Computes the probability density p(x,y) at (X,Y) for a bivariate gaussian distribution with standard deviations SIGMA_X, SIGMA_Y and correlation coefficient RHO Usage : p_x, p_y = bivariate_gaussian_pdf(x, y, sigma_x, sigma_y, rho)

If x and y are arrays, the function will iterate over them and return arrays

pygsl.rng.borosh13()
pygsl.rng.cauchy_pdf()

Computes the probability density p(x) at X for a Cauchy distribution with scale parameter A Usage: p = cauchy_pdf(x, a)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.chisq_pdf()

Computes the probability density p(x) at X for the chisq distribution Usage: p = chisq_pdf(x, nu)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.cmrg()
pygsl.rng.coveyou()
pygsl.rng.dirichlet_lnpdf()
Computes logarithmic of the probability density

p( heta_1, … , heta_K) at THETA[K] for a Dirichlet distribution with parameters ALPHA[K]

Usage:

pygsl.rng.dirichlet_pdf()

Computes the probability density p( heta_1, … , heta_K) at THETA[K] for a Dirichlet distribution with parameters ALPHA[K] Usage:

pygsl.rng.env_setup()

This function reads the environment variables `GSL_RNG_TYPE’ and `GSL_RNG_SEED’. The environment variable `GSL_RNG_TYPE’ should be the name of a generator, such as `taus’ or `mt19937’. The environment variable `GSL_RNG_SEED’ should contain the desired seed value. It is converted to an `unsigned long int’ using the C library function `strtoul’.

pygsl.rng.erlang_pdf()
pygsl.rng.exponential_pdf()

Computes the probability density p(x) at X for an exponential distribution with mean MU Usage: p = exponential_pdf(x, mu)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.exppow_pdf()

Computes the probability density p(x) at X for an exponential power distribution with scale parameter A and exponent B Usage: p = exppow_pdf(x, a, b)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.fdist_pdf()

Computes the probability density p(x) at X for the F-distribution with NU degrees of freedom. Usage: p = fdist_pdf(x, nu1)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.fishman18()
pygsl.rng.fishman20()
pygsl.rng.fishman2x()
pygsl.rng.flat_pdf()

Computes the probability density p(x) at X for the flat (uniform) distribution Usage: p = flat_pdf(x, a, b)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.gamma_pdf()

Computes the probability density p(x) at X for the gamma distribution Usage: p = gamma_pdf(x, a, b)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.gaussian_pdf()

Computes the probability density p(x) at x for a Gaussian distribution with standard deviation SIGMA Usage: p = gaussian_pdf(x, sigma)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.gaussian_tail_pdf()
Computes the probability density p(x) at X for a Gaussian tail

distribution with standard deviation SIGMA and lower limit A Usage: p = gaussian_tail_pdf(x, a, sigma)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.geometric_pdf()
Computes the probability density p(k) of obtaining K from a

geometric distribution with parameters P

Usage: p = geometric_pdf(k, P)

k can be an array. In this case this function will iterate over it and

return an array of p(k).

pygsl.rng.gfsr4()
pygsl.rng.gumbel1_pdf()

Computes the probability density p(x) at X for the gumbel1 distribution with parameters a and b Usage: p = gumbel1_pdf(x, a, b)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.gumbel2_pdf()

Computes the probability density p(x) at X for the gumbel2 distribution with parameters a and b Usage: p = gumbel2_pdf(x, a, b)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.hypergeometric_pdf()
Computes the probability density p(k) of obtaining K from a

hypergeometric distribution with parameters N1, N2, N3

Usage: p = hypergeometric_pdf(k, n1, n2, n3)

k can be an array. In this case this function will iterate over it and

return an array of p(k).

pygsl.rng.knuthran()
pygsl.rng.knuthran2()
pygsl.rng.knuthran2002()
pygsl.rng.landau_pdf()

Computes the probability density p(x) at X for the Landau distribution using an approximation. Usage: p = landau_pdf(x)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.laplace_pdf()

Computes the probability density p(x) at X for a Laplace distribution with mean A Usage: p = laplace_pdf(x, a)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.lecuyer21()
pygsl.rng.list_available_rngs()
pygsl.rng.logarithmic_pdf()
Computes the probability density p(k) of obtaining K from a

logarithmic distribution with parameters P and N

Usage: p = logarithmic_pdf(k, P, N)

k can be an array. In this case this function will iterate over it and

return an array of p(k).

pygsl.rng.logistic_pdf()

Computes the probability density p(x) at X for the logistic distribution Usage: p = logistic_pdf(x, a)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.lognormal_pdf()

Computes the probability density p(x) at X for the log normal distribution Usage: p = lognormal_pdf(x, zeta, sigma)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.minstd()
pygsl.rng.mrg()
pygsl.rng.mt19937()
pygsl.rng.mt19937_1998()
pygsl.rng.mt19937_1999()
pygsl.rng.multinomial_lnpdf()
Computes the probability P(n_1, n_2, …, n_K) of sampling N[K]

from a multinomial distribution with parameters P[K].

Usage: p = multinomial_pdf(phi, n)

phi … probability distribution over possible events. n … an two dimensional array, where each pdf is stored in one row

pygsl.rng.multinomial_pdf()
Computes the probability P(n_1, n_2, …, n_K) of sampling N[K]

from a multinomial distribution with parameters P[K].

Usage: p = multinomial_pdf(phi, n)

phi … probability distribution over possible events. n … an two dimensional array, where each pdf is stored in one row

pygsl.rng.negative_binomial_pdf()
Computes the probability density p(k) of obtaining K from a

negative binomial distribution with parameters P and N.

Usage: p = negative_binomial_pdf(k, P, N)

k can be an array. In this case this function will iterate over it and

return an array of p(k).

pygsl.rng.pareto_pdf()

Computes the probability density p(x) at X for the pareto distribution with exponent a and scale b Usage: p = pareto_pdf(x, a)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.pascal_pdf()
Computes the probability density p(k) of obtaining K from a

pascal distribution with parameters P and N

Usage: p = pascal_pdf(k, P, N)

k can be an array. In this case this function will iterate over it and

return an array of p(k).

pygsl.rng.poisson_pdf()

Computes the probability density p(k) at k for the poisson distribution with mean MU Usage: p = poisson_pdf(k, mu)

k can be an array. In this case this function will iterate over it and

return an array of p(k).

pygsl.rng.r250()
pygsl.rng.ran0()
pygsl.rng.ran1()
pygsl.rng.ran2()
pygsl.rng.ran3()
pygsl.rng.rand()
pygsl.rng.rand48()
pygsl.rng.random128_bsd()
pygsl.rng.random128_glibc2()
pygsl.rng.random128_libc5()
pygsl.rng.random256_bsd()
pygsl.rng.random256_glibc2()
pygsl.rng.random256_libc5()
pygsl.rng.random32_bsd()
pygsl.rng.random32_glibc2()
pygsl.rng.random32_libc5()
pygsl.rng.random64_bsd()
pygsl.rng.random64_glibc2()
pygsl.rng.random64_libc5()
pygsl.rng.random8_bsd()
pygsl.rng.random8_glibc2()
pygsl.rng.random8_libc5()
pygsl.rng.random_bsd()
pygsl.rng.random_glibc2()
pygsl.rng.random_libc5()
pygsl.rng.randu()
pygsl.rng.ranf()
pygsl.rng.ranlux()
pygsl.rng.ranlux389()
pygsl.rng.ranlxd1()
pygsl.rng.ranlxd2()
pygsl.rng.ranlxs0()
pygsl.rng.ranlxs1()
pygsl.rng.ranlxs2()
pygsl.rng.ranmar()
pygsl.rng.rayleigh_pdf()

Computes the probability density p(x) at X for a Rayleigh distribution with scale parameter SIGMA Usage: p = rayleigh_pdf(x, a, sigma)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.rayleigh_tail_pdf()

Computes the probability density p(x) at X for a Rayleigh tail distribution with scale parameter SIGMA and lower limit A. Usage: p = rayleigh_tail_pdf(x, a, sigma)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.rng()

RNG Object Constructor Usage: rng(rng_type) Input:

rng_type … one of the many rng types GSL provides.

pygsl.rng.slatec()
pygsl.rng.taus()
pygsl.rng.taus113()
pygsl.rng.taus2()
pygsl.rng.tdist_pdf()

Computes the probability density p(x) at X for the t-distribution with NU1 and NU2 degrees of freedom. Usage: p = tdist_pdf(x, nu1, nu2)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.transputer()
pygsl.rng.tt800()
pygsl.rng.ugaussian_pdf()
Computes the probability density p(x) at x for a Gaussian distribution

with standard deviation SIGMA=1 Usage: p = ugaussian_pdf(x)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.ugaussian_tail_pdf()
Computes the probability density p(x) at X for a Gaussian tail

distribution with standard deviation SIGMA=1 and lower limit A Usage: p = gaussian_tail_pdf(x, a, sigma)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.uni()
pygsl.rng.uni32()
pygsl.rng.vax()
pygsl.rng.waterman14()
pygsl.rng.weibull_pdf()

Computes the probability density p(x) at X for the weibull distribution with scale a and exponent b Usage: p = weibull_pdf(x, a)

x can be an array. In this case this function will iterate over it and

return an array of p(x).

pygsl.rng.zuf()
class pygsl.rng.mt19937

Bases:

qrng

A quasi-random sequence progressively covers a d-dimensional space with a set of points that are uniformly distributed. Quasi-random sequences are also known as low-discrepancy sequences. The quasi-random sequence generators use an interface that is similar to the interface for random number generators.

Currently two implementations are available: sobol and niederreiter_base_2.

The generators provide the following methods:

__init__(dim) … intalizes the random generator to dim dimensions. __call__(sample) … returns a two dimensional array with the shape

(sample, dim).

init() … initalizes the random generator to the original state. name() … get the name of the used generator __copy___() … returns an identical copy of the current generator.

pygsl.qrng.niederreiter_base_2(dimension)[source]

This generator uses the algorithm described in Bratley, Fox, Niederreiter, `ACM Trans. Model. Comp. Sim.’ 2, 195 (1992). It is valid up to 12 dimensions.

pygsl.qrng.sobol(dimension)[source]

This generator uses the Sobol sequence described in Antonov, Saleev, `USSR Comput. Maths. Math. Phys.’ 19, 252 (1980). It is valid up to 40 dimensions.

statistics

monte

Wrapper for the Monte carlo integrators provided by GSL.

class pygsl.monte.miser(dim)[source]

Bases: _Monte

get_alpha()[source]
get_dither()[source]
get_estimate_frac()[source]
get_min_calls()[source]
get_min_calls_per_bisection()[source]
set_alpha(arg1)[source]
set_dither(arg1)[source]
set_estimate_frac(arg1)[source]
set_min_calls(arg1)[source]
set_min_calls_per_bisection(arg1)[source]
class pygsl.monte.plain(dim)[source]

Bases: _Monte

class pygsl.monte.vegas(dim)[source]

Bases: _Monte

get_alpha()[source]
get_chisq()[source]
get_iterations()[source]
get_mode()[source]
get_ostream()[source]
get_result()[source]
get_sigma()[source]
get_stage()[source]
get_verbose()[source]
set_alpha(arg1)[source]
set_chisq(arg1)[source]
set_iterations(arg1)[source]
set_mode(arg1)[source]
set_ostream(arg1)[source]
set_result(arg1)[source]
set_sigma(arg1)[source]
set_stage(arg1)[source]
set_verbose(arg1)[source]
class pygsl.monte._Monte(dim)[source]

Bases: object

Base Wrapper class. This class does not implement any solver itself, so you should use a derived class eg. miser, vegas, or plain.

__del__()[source]
get_name()[source]

To be compatible with the other solvers I added this method

init()[source]

(Re)initialises the solver

integrate(func, xl, xu, ncalls, r)[source]
Input:

func … the function to solve. Must be a gsl_monte_function xl … the lower limits for the integration xu … the upper limits for the integration ncalls … number of calls r … random generator from pygsl.rng

Output:

val … the value abserr … the error estimate for that value

siman

Wrapper for the Simulated Annealing Solver provided by GSL.

The simulated annealing algorithm takes random walks through the problem space, looking for points with low energies; in these random walks, the probability of taking a step is determined by the Boltzmann distribution,

\[p = e^{-(E_{i+1} - E_i)/(kT)}\]

if E_{i+1} > E_i, and p = 1 when E_{i+1} <= E_i.

In other words, a step will occur if the new energy is lower. If the new

energy is higher, the transition can still occur, and its likelihood is proportional to the temperature T and inversely proportional to the energy difference E_{i+1} - E_i.

The temperature T is initially set to a high value, and a random walk is

carried out at that temperature. Then the temperature is lowered very slightly according to a “cooling schedule”, for example: T -> T/mu_T where mu_T is slightly greater than 1.

The slight probability of taking a step that gives higher energy is what

allows simulated annealing to frequently get out of local minima.

This wrapper does not follow the GSL interface as closely as the other wrappers in this package. Instead it expects an object describing the problem with the required methods. NumericEnsemble illustrates the necessary methods.

The function solve does the real job.

Have a look in the examples directory for the pythonic version of the simple problem as described in the GSL reference document.

class pygsl.siman.NumericEnsemble[source]

Bases: object

A base class implementation to support the use of numeric arrays as configurations. You must overload the following functions

in a derived class.

If you want, that the solver prints it status to the stdout add a * Print() method.

Clone()[source]

Make a clone of the current object. Please be careful how you step and clone so that your objects are different!

Output:

clone … a identical clone of this object.

abstractmethod EFunc() float[source]

Calculate the energy of the current status.

Returns:

a Python float of the current energy

Return type:

energy

GetData()[source]
abstractmethod Metric(other) float[source]

Calculate the distance between this object and the other.

Parameters:

other – a instance of the same type

Returns:

a python float for the distance between this instance

and the other.

Return type:

length

Print()[source]

Print the current state of the ensemble

SetData(data)[source]
abstractmethod Step(rng, step_size) None[source]

Take a step

Parameters:
  • rng – a pygsl.rng instance

  • step_size – a python float for the step size to be taken

pygsl.siman.solve()

Simulated annealing driver.

Usage: result = solve(r, x0, …)

Parameters:
  • r – a random generator from pygsl.rng

  • x0

    a configuration. It must be an object providing the following .. method:: * EFunc()

    \* Metric()
    \* Step()
    \* Clone()

    If you want to use the print functionality you must provide the following method:

    \* Print()

Keyword Arguments:
  • 200 (n_tries =) – how many points to try for each step

  • 10 (step_size =) – how many iterations at each temperature?

  • 10

    max step size in the random walk

    parameters for the Boltzmann distribution

  • 1.0 (k =) – Boltzmann constant

  • 0.002 (t_initial =) – initial temperature

  • 1.005 (mu_t =) – damping factor for the temperature

  • 2.0e-6 (t_min =)

  • 0 (do_print =) – print the status of the annealing process (== 0: do not print) ( > 0: print)

Returns:

a object of type x0 with the final value.

Return type:

result

odeiv2

Wrapper for the ODEIV2 module

class pygsl.odeiv2.system

Bases: SwigPyObject

::pygsl_odeiv2_system

acquire()

acquires ownership of the pointer

append(object, /)

appends another ‘this’ object

disown()

releases ownership of the pointer

next()

returns the next ‘this’ object

own()

returns/sets ownership of the pointer

set_dimension(system self, size_t dimension) gsl_error_flag_drop
Parameters:

dimension (size_t)

set_func(system self, PyObject * cb) gsl_error_flag_drop
Parameters:

cb (PyObject *)

set_jacobian(system self, PyObject * cb) gsl_error_flag_drop
Parameters:

cb (PyObject *)

this
thisown
class pygsl.odeiv2.pygsl_odeiv2_step

Bases: SwigPyObject

::pygsl_odeiv2_step

acquire()

acquires ownership of the pointer

append(object, /)

appends another ‘this’ object

apply(pygsl_odeiv2_step self, double t, double h, PyObject * y_o, PyObject * dydt_in_o, PyObject * dydt_out_o, system dydt) PyObject *
Parameters:
  • t (double)

  • h (double)

  • y_o (PyObject *)

  • dydt_in_o (PyObject *)

  • dydt_out_o (PyObject *)

  • dydt (pygsl_odeiv2_system *)

disown()

releases ownership of the pointer

name(pygsl_odeiv2_step self) char const *
next()

returns the next ‘this’ object

order(pygsl_odeiv2_step self) unsigned int
own()

returns/sets ownership of the pointer

reset(pygsl_odeiv2_step self) gsl_error_flag_drop
this
thisown
class pygsl.odeiv2.pygsl_odeiv2_control

Bases: SwigPyObject

::pygsl_odeiv2_control

acquire()

acquires ownership of the pointer

append(object, /)

appends another ‘this’ object

disown()

releases ownership of the pointer

errlevel(pygsl_odeiv2_control self, double const y, double const dydt, double const h, size_t const ind, double * errlev) gsl_error_flag_drop
Parameters:
  • y (double const)

  • dydt (double const)

  • h (double const)

  • ind (size_t const)

  • errlev (double *)

hadjust(pygsl_odeiv2_control self, pygsl_odeiv2_step s, PyObject * y_o, PyObject * yerr_o, PyObject * dydt_o, double h_in) PyObject *
Parameters:
  • s (pygsl_odeiv2_step *)

  • y_o (PyObject *)

  • yerr_o (PyObject *)

  • dydt_o (PyObject *)

  • h_in (double)

init(pygsl_odeiv2_control self, double eps_abs, double eps_rel, double a_y, double a_dydt) gsl_error_flag_drop
Parameters:
  • eps_abs (double)

  • eps_rel (double)

  • a_y (double)

  • a_dydt (double)

name(pygsl_odeiv2_control self) char const *
next()

returns the next ‘this’ object

own()

returns/sets ownership of the pointer

this
thisown
class pygsl.odeiv2.pygsl_odeiv2_evolve

Bases: SwigPyObject

::pygsl_odeiv2_evolve

acquire()

acquires ownership of the pointer

append(object, /)

appends another ‘this’ object

apply(pygsl_odeiv2_evolve self, pygsl_odeiv2_control con, pygsl_odeiv2_step step, system sys, double const t_in, double const t1, double const h_in, PyObject * y_in_o) PyObject *
Parameters:
  • con (pygsl_odeiv2_control *)

  • step (pygsl_odeiv2_step *)

  • sys (pygsl_odeiv2_system const *)

  • t_in (double const)

  • t1 (double const)

  • h_in (double const)

  • y_in_o (PyObject *)

apply_fixed_step(pygsl_odeiv2_evolve self, pygsl_odeiv2_control con, pygsl_odeiv2_step step, system sys, double const t_in, double const h0, PyObject * y_in_o) PyObject *
Parameters:
  • con (pygsl_odeiv2_control *)

  • step (pygsl_odeiv2_step *)

  • sys (pygsl_odeiv2_system const *)

  • t_in (double const)

  • h0 (double const)

  • y_in_o (PyObject *)

disown()

releases ownership of the pointer

get_yerr(pygsl_odeiv2_evolve self) PyObject *
next()

returns the next ‘this’ object

own()

returns/sets ownership of the pointer

reset(pygsl_odeiv2_evolve self) gsl_error_flag_drop
this
thisown
system.set_dimension(system self, size_t dimension) gsl_error_flag_drop
Parameters:

dimension (size_t)

system.set_func(system self, PyObject * cb) gsl_error_flag_drop
Parameters:

cb (PyObject *)

system.set_jacobian(system self, PyObject * cb) gsl_error_flag_drop
Parameters:

cb (PyObject *)

class pygsl.odeiv2.pygsl_odeiv2_step

::pygsl_odeiv2_step

class pygsl.odeiv2.pygsl_odeiv2_control

::pygsl_odeiv2_control

pygsl.odeiv2.hadj_nil = 0

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.odeiv2.hadj_inc = 1

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.odeiv2.hadj_dec = -1

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.odeiv2.step_rk2 = <Swig Object of type 'gsl_odeiv2_step_type *'>

Swig object carries a C/C++ instance pointer

pygsl.odeiv2.step_rk4 = <Swig Object of type 'gsl_odeiv2_step_type *'>

Swig object carries a C/C++ instance pointer

pygsl.odeiv2.step_rkf45 = <Swig Object of type 'gsl_odeiv2_step_type *'>

Swig object carries a C/C++ instance pointer

pygsl.odeiv2.step_rkck = <Swig Object of type 'gsl_odeiv2_step_type *'>

Swig object carries a C/C++ instance pointer

pygsl.odeiv2.step_rk8pd = <Swig Object of type 'gsl_odeiv2_step_type *'>

Swig object carries a C/C++ instance pointer

pygsl.odeiv2.step_rk2imp = <Swig Object of type 'gsl_odeiv2_step_type *'>

Swig object carries a C/C++ instance pointer

pygsl.odeiv2.step_rk4imp = <Swig Object of type 'gsl_odeiv2_step_type *'>

Swig object carries a C/C++ instance pointer

pygsl.odeiv2.step_bsimp = <Swig Object of type 'gsl_odeiv2_step_type *'>

Swig object carries a C/C++ instance pointer

pygsl.odeiv2.step_rk1imp = <Swig Object of type 'gsl_odeiv2_step_type *'>

Swig object carries a C/C++ instance pointer

pygsl.odeiv2.step_msadams = <Swig Object of type 'gsl_odeiv2_step_type *'>

Swig object carries a C/C++ instance pointer

pygsl.odeiv2.step_msbdf = <Swig Object of type 'gsl_odeiv2_step_type *'>

Swig object carries a C/C++ instance pointer

interpolation

Wrapper for the interpolations of gsl. This solver wraps all features as described in Interpolation

Difference between spline and interpolation module:

In the interpolation module the data for the independent and dependent data are kept as reference in the various objects,whereas the spline module copies these data into the internal C gsl_spline struct.

class pygsl.interpolation.akima(n)[source]

Bases: _interpolation

Akima spline with natural boundary conditions

accel_find(x)

This method performs a lookup action on the data array X_ARRAY of size SIZE, using the given accelerator A. This is how lookups are performed during evaluation of an interpolation. The function returns an index i such that `xarray[i] <= x < xarray[i+1]’.

accel_reset()
eval(x)

eval the interpolation at point x

Parameters:

x – value of the independent variable

Returns:

the interpolated value at x

Return type:

y

eval_deriv(x)
inputx

x … value of the independent variable

outputy

y … returns the value of the derivative at x

eval_deriv2(x)
inputx

x … value of the independent variable

outputy

y … the value of the second derivative at x

eval_deriv2_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … the value of the second derivative at x

eval_deriv_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … returns the value of the derivative at x

eval_e(x)

evaluate and flag error if it occurs

Parameters:

x – value of the independent variable

Returns:

error flag y: interpolated value at x

Return type:

flag

eval_integ(a, b)

Evaluate the integral

Parameters:
  • a – lower boundary

  • b – upper boundary

Returns:

the integral of the object over the range [a,b]

Return type:

y

eval_integ_e(a, b)
inputa, b,

a … lower boundary b … upper boundary

outputflag, y

flag error flag y … the integral of the object over the range [a,b]

init(xa, ya)

Initalise the interpolation object

Argsxa, ya

xa … array of independent values ya … array of dependent values

This method initializes this for the data (xa,ay) where ya and ya are arrays of the size, which was set, when this object was initialised. The interpolation object only keeps references to the data arrays xa and ya and and stores the static state computed from the data. The ya data array is always assumed to be strictly ordered; the behavior for other arrangements is not defined.

min_size()

Returns the minimum number of points required by the interpolation.

name()

Returns the name of the interpolation type used

class pygsl.interpolation.akima_periodic(n)[source]

Bases: _interpolation

Akima spline with periodic boundary conditions

accel_find(x)

This method performs a lookup action on the data array X_ARRAY of size SIZE, using the given accelerator A. This is how lookups are performed during evaluation of an interpolation. The function returns an index i such that `xarray[i] <= x < xarray[i+1]’.

accel_reset()
eval(x)

eval the interpolation at point x

Parameters:

x – value of the independent variable

Returns:

the interpolated value at x

Return type:

y

eval_deriv(x)
inputx

x … value of the independent variable

outputy

y … returns the value of the derivative at x

eval_deriv2(x)
inputx

x … value of the independent variable

outputy

y … the value of the second derivative at x

eval_deriv2_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … the value of the second derivative at x

eval_deriv_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … returns the value of the derivative at x

eval_e(x)

evaluate and flag error if it occurs

Parameters:

x – value of the independent variable

Returns:

error flag y: interpolated value at x

Return type:

flag

eval_integ(a, b)

Evaluate the integral

Parameters:
  • a – lower boundary

  • b – upper boundary

Returns:

the integral of the object over the range [a,b]

Return type:

y

eval_integ_e(a, b)
inputa, b,

a … lower boundary b … upper boundary

outputflag, y

flag error flag y … the integral of the object over the range [a,b]

init(xa, ya)

Initalise the interpolation object

Argsxa, ya

xa … array of independent values ya … array of dependent values

This method initializes this for the data (xa,ay) where ya and ya are arrays of the size, which was set, when this object was initialised. The interpolation object only keeps references to the data arrays xa and ya and and stores the static state computed from the data. The ya data array is always assumed to be strictly ordered; the behavior for other arrangements is not defined.

min_size()

Returns the minimum number of points required by the interpolation.

name()

Returns the name of the interpolation type used

pygsl.interpolation.bsearch(xa, x, index_lo, index_high)[source]

input : x, index_lo, index_high

This function returns the index i of the array X_ARRAY such that `x_array[i] <= x < x_array[i+1]’. The index is searched for in the range [INDEX_LO,INDEX_HI].

class pygsl.interpolation.cspline(n)[source]

Bases: _interpolation

Cubic spline with natural boundary conditions.

accel_find(x)

This method performs a lookup action on the data array X_ARRAY of size SIZE, using the given accelerator A. This is how lookups are performed during evaluation of an interpolation. The function returns an index i such that `xarray[i] <= x < xarray[i+1]’.

accel_reset()
eval(x)

eval the interpolation at point x

Parameters:

x – value of the independent variable

Returns:

the interpolated value at x

Return type:

y

eval_deriv(x)
inputx

x … value of the independent variable

outputy

y … returns the value of the derivative at x

eval_deriv2(x)
inputx

x … value of the independent variable

outputy

y … the value of the second derivative at x

eval_deriv2_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … the value of the second derivative at x

eval_deriv_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … returns the value of the derivative at x

eval_e(x)

evaluate and flag error if it occurs

Parameters:

x – value of the independent variable

Returns:

error flag y: interpolated value at x

Return type:

flag

eval_integ(a, b)

Evaluate the integral

Parameters:
  • a – lower boundary

  • b – upper boundary

Returns:

the integral of the object over the range [a,b]

Return type:

y

eval_integ_e(a, b)
inputa, b,

a … lower boundary b … upper boundary

outputflag, y

flag error flag y … the integral of the object over the range [a,b]

init(xa, ya)

Initalise the interpolation object

Argsxa, ya

xa … array of independent values ya … array of dependent values

This method initializes this for the data (xa,ay) where ya and ya are arrays of the size, which was set, when this object was initialised. The interpolation object only keeps references to the data arrays xa and ya and and stores the static state computed from the data. The ya data array is always assumed to be strictly ordered; the behavior for other arrangements is not defined.

min_size()

Returns the minimum number of points required by the interpolation.

name()

Returns the name of the interpolation type used

class pygsl.interpolation.cspline_periodic(n)[source]

Bases: _interpolation

Cubic spline with periodic boundary conditions

accel_find(x)

This method performs a lookup action on the data array X_ARRAY of size SIZE, using the given accelerator A. This is how lookups are performed during evaluation of an interpolation. The function returns an index i such that `xarray[i] <= x < xarray[i+1]’.

accel_reset()
eval(x)

eval the interpolation at point x

Parameters:

x – value of the independent variable

Returns:

the interpolated value at x

Return type:

y

eval_deriv(x)
inputx

x … value of the independent variable

outputy

y … returns the value of the derivative at x

eval_deriv2(x)
inputx

x … value of the independent variable

outputy

y … the value of the second derivative at x

eval_deriv2_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … the value of the second derivative at x

eval_deriv_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … returns the value of the derivative at x

eval_e(x)

evaluate and flag error if it occurs

Parameters:

x – value of the independent variable

Returns:

error flag y: interpolated value at x

Return type:

flag

eval_integ(a, b)

Evaluate the integral

Parameters:
  • a – lower boundary

  • b – upper boundary

Returns:

the integral of the object over the range [a,b]

Return type:

y

eval_integ_e(a, b)
inputa, b,

a … lower boundary b … upper boundary

outputflag, y

flag error flag y … the integral of the object over the range [a,b]

init(xa, ya)

Initalise the interpolation object

Argsxa, ya

xa … array of independent values ya … array of dependent values

This method initializes this for the data (xa,ay) where ya and ya are arrays of the size, which was set, when this object was initialised. The interpolation object only keeps references to the data arrays xa and ya and and stores the static state computed from the data. The ya data array is always assumed to be strictly ordered; the behavior for other arrangements is not defined.

min_size()

Returns the minimum number of points required by the interpolation.

name()

Returns the name of the interpolation type used

class pygsl.interpolation.linear(n)[source]

Bases: _interpolation

Linear interpolation.

accel_find(x)

This method performs a lookup action on the data array X_ARRAY of size SIZE, using the given accelerator A. This is how lookups are performed during evaluation of an interpolation. The function returns an index i such that `xarray[i] <= x < xarray[i+1]’.

accel_reset()
eval(x)

eval the interpolation at point x

Parameters:

x – value of the independent variable

Returns:

the interpolated value at x

Return type:

y

eval_deriv(x)
inputx

x … value of the independent variable

outputy

y … returns the value of the derivative at x

eval_deriv2(x)
inputx

x … value of the independent variable

outputy

y … the value of the second derivative at x

eval_deriv2_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … the value of the second derivative at x

eval_deriv_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … returns the value of the derivative at x

eval_e(x)

evaluate and flag error if it occurs

Parameters:

x – value of the independent variable

Returns:

error flag y: interpolated value at x

Return type:

flag

eval_integ(a, b)

Evaluate the integral

Parameters:
  • a – lower boundary

  • b – upper boundary

Returns:

the integral of the object over the range [a,b]

Return type:

y

eval_integ_e(a, b)
inputa, b,

a … lower boundary b … upper boundary

outputflag, y

flag error flag y … the integral of the object over the range [a,b]

init(xa, ya)

Initalise the interpolation object

Argsxa, ya

xa … array of independent values ya … array of dependent values

This method initializes this for the data (xa,ay) where ya and ya are arrays of the size, which was set, when this object was initialised. The interpolation object only keeps references to the data arrays xa and ya and and stores the static state computed from the data. The ya data array is always assumed to be strictly ordered; the behavior for other arrangements is not defined.

min_size()

Returns the minimum number of points required by the interpolation.

name()

Returns the name of the interpolation type used

class pygsl.interpolation.polynomial(n)[source]

Bases: _interpolation

Polynomial interpolation.

This method should only be used for interpolating small numbers of points because polynomial interpolation introduces large oscillations, even for well-behaved datasets. The number of terms in the interpolating polynomial is equal to the number of points.

accel_find(x)

This method performs a lookup action on the data array X_ARRAY of size SIZE, using the given accelerator A. This is how lookups are performed during evaluation of an interpolation. The function returns an index i such that `xarray[i] <= x < xarray[i+1]’.

accel_reset()
eval(x)

eval the interpolation at point x

Parameters:

x – value of the independent variable

Returns:

the interpolated value at x

Return type:

y

eval_deriv(x)
inputx

x … value of the independent variable

outputy

y … returns the value of the derivative at x

eval_deriv2(x)
inputx

x … value of the independent variable

outputy

y … the value of the second derivative at x

eval_deriv2_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … the value of the second derivative at x

eval_deriv_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … returns the value of the derivative at x

eval_e(x)

evaluate and flag error if it occurs

Parameters:

x – value of the independent variable

Returns:

error flag y: interpolated value at x

Return type:

flag

eval_integ(a, b)

Evaluate the integral

Parameters:
  • a – lower boundary

  • b – upper boundary

Returns:

the integral of the object over the range [a,b]

Return type:

y

eval_integ_e(a, b)
inputa, b,

a … lower boundary b … upper boundary

outputflag, y

flag error flag y … the integral of the object over the range [a,b]

init(xa, ya)

Initalise the interpolation object

Argsxa, ya

xa … array of independent values ya … array of dependent values

This method initializes this for the data (xa,ay) where ya and ya are arrays of the size, which was set, when this object was initialised. The interpolation object only keeps references to the data arrays xa and ya and and stores the static state computed from the data. The ya data array is always assumed to be strictly ordered; the behavior for other arrangements is not defined.

min_size()

Returns the minimum number of points required by the interpolation.

name()

Returns the name of the interpolation type used

class pygsl.interpolation._common[source]

Bases: object

accel_find(x)[source]

This method performs a lookup action on the data array X_ARRAY of size SIZE, using the given accelerator A. This is how lookups are performed during evaluation of an interpolation. The function returns an index i such that `xarray[i] <= x < xarray[i+1]’.

accel_reset()[source]
eval(x)[source]

eval the interpolation at point x

Parameters:

x – value of the independent variable

Returns:

the interpolated value at x

Return type:

y

eval_deriv(x)[source]
inputx

x … value of the independent variable

outputy

y … returns the value of the derivative at x

eval_deriv2(x)[source]
inputx

x … value of the independent variable

outputy

y … the value of the second derivative at x

eval_deriv2_e(x)[source]
inputx

x … value of the independent variable

outputflag, y

flag error flag y … the value of the second derivative at x

eval_deriv_e(x)[source]
inputx

x … value of the independent variable

outputflag, y

flag error flag y … returns the value of the derivative at x

eval_e(x)[source]

evaluate and flag error if it occurs

Parameters:

x – value of the independent variable

Returns:

error flag y: interpolated value at x

Return type:

flag

eval_integ(a, b)[source]

Evaluate the integral

Parameters:
  • a – lower boundary

  • b – upper boundary

Returns:

the integral of the object over the range [a,b]

Return type:

y

eval_integ_e(a, b)[source]
inputa, b,

a … lower boundary b … upper boundary

outputflag, y

flag error flag y … the integral of the object over the range [a,b]

min_size()[source]

Returns the minimum number of points required by the interpolation.

name()[source]

Returns the name of the interpolation type used

class pygsl.interpolation._interpolation(n)[source]

Bases: _common

accel_find(x)

This method performs a lookup action on the data array X_ARRAY of size SIZE, using the given accelerator A. This is how lookups are performed during evaluation of an interpolation. The function returns an index i such that `xarray[i] <= x < xarray[i+1]’.

accel_reset()
eval(x)

eval the interpolation at point x

Parameters:

x – value of the independent variable

Returns:

the interpolated value at x

Return type:

y

eval_deriv(x)
inputx

x … value of the independent variable

outputy

y … returns the value of the derivative at x

eval_deriv2(x)
inputx

x … value of the independent variable

outputy

y … the value of the second derivative at x

eval_deriv2_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … the value of the second derivative at x

eval_deriv_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … returns the value of the derivative at x

eval_e(x)

evaluate and flag error if it occurs

Parameters:

x – value of the independent variable

Returns:

error flag y: interpolated value at x

Return type:

flag

eval_integ(a, b)

Evaluate the integral

Parameters:
  • a – lower boundary

  • b – upper boundary

Returns:

the integral of the object over the range [a,b]

Return type:

y

eval_integ_e(a, b)
inputa, b,

a … lower boundary b … upper boundary

outputflag, y

flag error flag y … the integral of the object over the range [a,b]

init(xa, ya)[source]

Initalise the interpolation object

Argsxa, ya

xa … array of independent values ya … array of dependent values

This method initializes this for the data (xa,ay) where ya and ya are arrays of the size, which was set, when this object was initialised. The interpolation object only keeps references to the data arrays xa and ya and and stores the static state computed from the data. The ya data array is always assumed to be strictly ordered; the behavior for other arrangements is not defined.

min_size()

Returns the minimum number of points required by the interpolation.

name()

Returns the name of the interpolation type used

spline

Wrapper for the splines of gsl. This solver wraps all features as described in Chapter 26 of the gsl documentation.

Difference between spline and interpolation module:

In the interpolation module the data for the independent and dependent data are kept as reference in the various objects,whereas the spline module copies these data into the internal C gsl_spline struct.

class pygsl.spline.akima(n)[source]

Bases: _spline

Akima spline with natural boundary conditions

GetAccelCObject()

Useful when using GSL in C code.

GetSplineCObject()

Useful when using GSL in C code.

accel_find(x)

This method performs a lookup action on the data array X_ARRAY of size SIZE, using the given accelerator A. This is how lookups are performed during evaluation of an interpolation. The function returns an index i such that `xarray[i] <= x < xarray[i+1]’.

accel_reset()
eval(x)

eval the interpolation at point x

Parameters:

x – value of the independent variable

Returns:

the interpolated value at x

Return type:

y

eval_deriv(x)
inputx

x … value of the independent variable

outputy

y … returns the value of the derivative at x

eval_deriv2(x)
inputx

x … value of the independent variable

outputy

y … the value of the second derivative at x

eval_deriv2_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … the value of the second derivative at x

eval_deriv2_e_vector(x)
inputx

a vector of independent values

eval_deriv2_vector(x)
inputx

a vector of independent values

eval_deriv_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … returns the value of the derivative at x

eval_deriv_e_vector(x)
inputx

a vector of independent values

eval_deriv_vector(x)
inputx

a vector of independent values

eval_e(x)

evaluate and flag error if it occurs

Parameters:

x – value of the independent variable

Returns:

error flag y: interpolated value at x

Return type:

flag

eval_e_vector(x)
inputx

a vector of independent values

eval_integ(a, b)

Evaluate the integral

Parameters:
  • a – lower boundary

  • b – upper boundary

Returns:

the integral of the object over the range [a,b]

Return type:

y

eval_integ_e(a, b)
inputa, b,

a … lower boundary b … upper boundary

outputflag, y

flag error flag y … the integral of the object over the range [a,b]

eval_integ_e_vector(a, b)
inputa, b

two vector of independent values of same length

eval_integ_vector(a, b)
inputa, b

two vector of independent values of same length

eval_vector(x)
inputx

a vector of independent values

init(xa, ya)
inputxa, ya

xa … array of independent values ya … array of dependent values

This method initializes this for the data (xa,ay) where ya and ya are arrays of the size, which was set, when this object was initialised. The interpolation object copys the data arrays xa and ya and and stores the static state computed from the data. The ya data array is always assumed to be strictly ordered; the behavior for other arrangements is not defined.

min_size()

Returns the minimum number of points required by the interpolation.

name()

Returns the name of the interpolation type used

class pygsl.spline.akima_periodic(n)[source]

Bases: _spline

Akima spline with periodic boundary conditions

GetAccelCObject()

Useful when using GSL in C code.

GetSplineCObject()

Useful when using GSL in C code.

accel_find(x)

This method performs a lookup action on the data array X_ARRAY of size SIZE, using the given accelerator A. This is how lookups are performed during evaluation of an interpolation. The function returns an index i such that `xarray[i] <= x < xarray[i+1]’.

accel_reset()
eval(x)

eval the interpolation at point x

Parameters:

x – value of the independent variable

Returns:

the interpolated value at x

Return type:

y

eval_deriv(x)
inputx

x … value of the independent variable

outputy

y … returns the value of the derivative at x

eval_deriv2(x)
inputx

x … value of the independent variable

outputy

y … the value of the second derivative at x

eval_deriv2_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … the value of the second derivative at x

eval_deriv2_e_vector(x)
inputx

a vector of independent values

eval_deriv2_vector(x)
inputx

a vector of independent values

eval_deriv_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … returns the value of the derivative at x

eval_deriv_e_vector(x)
inputx

a vector of independent values

eval_deriv_vector(x)
inputx

a vector of independent values

eval_e(x)

evaluate and flag error if it occurs

Parameters:

x – value of the independent variable

Returns:

error flag y: interpolated value at x

Return type:

flag

eval_e_vector(x)
inputx

a vector of independent values

eval_integ(a, b)

Evaluate the integral

Parameters:
  • a – lower boundary

  • b – upper boundary

Returns:

the integral of the object over the range [a,b]

Return type:

y

eval_integ_e(a, b)
inputa, b,

a … lower boundary b … upper boundary

outputflag, y

flag error flag y … the integral of the object over the range [a,b]

eval_integ_e_vector(a, b)
inputa, b

two vector of independent values of same length

eval_integ_vector(a, b)
inputa, b

two vector of independent values of same length

eval_vector(x)
inputx

a vector of independent values

init(xa, ya)
inputxa, ya

xa … array of independent values ya … array of dependent values

This method initializes this for the data (xa,ay) where ya and ya are arrays of the size, which was set, when this object was initialised. The interpolation object copys the data arrays xa and ya and and stores the static state computed from the data. The ya data array is always assumed to be strictly ordered; the behavior for other arrangements is not defined.

min_size()

Returns the minimum number of points required by the interpolation.

name()

Returns the name of the interpolation type used

class pygsl.spline.cspline(n)[source]

Bases: _spline

Cubic spline with natural boundary conditions.

GetAccelCObject()

Useful when using GSL in C code.

GetSplineCObject()

Useful when using GSL in C code.

accel_find(x)

This method performs a lookup action on the data array X_ARRAY of size SIZE, using the given accelerator A. This is how lookups are performed during evaluation of an interpolation. The function returns an index i such that `xarray[i] <= x < xarray[i+1]’.

accel_reset()
eval(x)

eval the interpolation at point x

Parameters:

x – value of the independent variable

Returns:

the interpolated value at x

Return type:

y

eval_deriv(x)
inputx

x … value of the independent variable

outputy

y … returns the value of the derivative at x

eval_deriv2(x)
inputx

x … value of the independent variable

outputy

y … the value of the second derivative at x

eval_deriv2_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … the value of the second derivative at x

eval_deriv2_e_vector(x)
inputx

a vector of independent values

eval_deriv2_vector(x)
inputx

a vector of independent values

eval_deriv_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … returns the value of the derivative at x

eval_deriv_e_vector(x)
inputx

a vector of independent values

eval_deriv_vector(x)
inputx

a vector of independent values

eval_e(x)

evaluate and flag error if it occurs

Parameters:

x – value of the independent variable

Returns:

error flag y: interpolated value at x

Return type:

flag

eval_e_vector(x)
inputx

a vector of independent values

eval_integ(a, b)

Evaluate the integral

Parameters:
  • a – lower boundary

  • b – upper boundary

Returns:

the integral of the object over the range [a,b]

Return type:

y

eval_integ_e(a, b)
inputa, b,

a … lower boundary b … upper boundary

outputflag, y

flag error flag y … the integral of the object over the range [a,b]

eval_integ_e_vector(a, b)
inputa, b

two vector of independent values of same length

eval_integ_vector(a, b)
inputa, b

two vector of independent values of same length

eval_vector(x)
inputx

a vector of independent values

init(xa, ya)
inputxa, ya

xa … array of independent values ya … array of dependent values

This method initializes this for the data (xa,ay) where ya and ya are arrays of the size, which was set, when this object was initialised. The interpolation object copys the data arrays xa and ya and and stores the static state computed from the data. The ya data array is always assumed to be strictly ordered; the behavior for other arrangements is not defined.

min_size()

Returns the minimum number of points required by the interpolation.

name()

Returns the name of the interpolation type used

class pygsl.spline.cspline_periodic(n)[source]

Bases: _spline

Cubic spline with periodic boundary conditions

GetAccelCObject()

Useful when using GSL in C code.

GetSplineCObject()

Useful when using GSL in C code.

accel_find(x)

This method performs a lookup action on the data array X_ARRAY of size SIZE, using the given accelerator A. This is how lookups are performed during evaluation of an interpolation. The function returns an index i such that `xarray[i] <= x < xarray[i+1]’.

accel_reset()
eval(x)

eval the interpolation at point x

Parameters:

x – value of the independent variable

Returns:

the interpolated value at x

Return type:

y

eval_deriv(x)
inputx

x … value of the independent variable

outputy

y … returns the value of the derivative at x

eval_deriv2(x)
inputx

x … value of the independent variable

outputy

y … the value of the second derivative at x

eval_deriv2_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … the value of the second derivative at x

eval_deriv2_e_vector(x)
inputx

a vector of independent values

eval_deriv2_vector(x)
inputx

a vector of independent values

eval_deriv_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … returns the value of the derivative at x

eval_deriv_e_vector(x)
inputx

a vector of independent values

eval_deriv_vector(x)
inputx

a vector of independent values

eval_e(x)

evaluate and flag error if it occurs

Parameters:

x – value of the independent variable

Returns:

error flag y: interpolated value at x

Return type:

flag

eval_e_vector(x)
inputx

a vector of independent values

eval_integ(a, b)

Evaluate the integral

Parameters:
  • a – lower boundary

  • b – upper boundary

Returns:

the integral of the object over the range [a,b]

Return type:

y

eval_integ_e(a, b)
inputa, b,

a … lower boundary b … upper boundary

outputflag, y

flag error flag y … the integral of the object over the range [a,b]

eval_integ_e_vector(a, b)
inputa, b

two vector of independent values of same length

eval_integ_vector(a, b)
inputa, b

two vector of independent values of same length

eval_vector(x)
inputx

a vector of independent values

init(xa, ya)
inputxa, ya

xa … array of independent values ya … array of dependent values

This method initializes this for the data (xa,ay) where ya and ya are arrays of the size, which was set, when this object was initialised. The interpolation object copys the data arrays xa and ya and and stores the static state computed from the data. The ya data array is always assumed to be strictly ordered; the behavior for other arrangements is not defined.

min_size()

Returns the minimum number of points required by the interpolation.

name()

Returns the name of the interpolation type used

class pygsl.spline.linear(n)[source]

Bases: _spline

Linear interpolation.

GetAccelCObject()

Useful when using GSL in C code.

GetSplineCObject()

Useful when using GSL in C code.

accel_find(x)

This method performs a lookup action on the data array X_ARRAY of size SIZE, using the given accelerator A. This is how lookups are performed during evaluation of an interpolation. The function returns an index i such that `xarray[i] <= x < xarray[i+1]’.

accel_reset()
eval(x)

eval the interpolation at point x

Parameters:

x – value of the independent variable

Returns:

the interpolated value at x

Return type:

y

eval_deriv(x)
inputx

x … value of the independent variable

outputy

y … returns the value of the derivative at x

eval_deriv2(x)
inputx

x … value of the independent variable

outputy

y … the value of the second derivative at x

eval_deriv2_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … the value of the second derivative at x

eval_deriv2_e_vector(x)
inputx

a vector of independent values

eval_deriv2_vector(x)
inputx

a vector of independent values

eval_deriv_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … returns the value of the derivative at x

eval_deriv_e_vector(x)
inputx

a vector of independent values

eval_deriv_vector(x)
inputx

a vector of independent values

eval_e(x)

evaluate and flag error if it occurs

Parameters:

x – value of the independent variable

Returns:

error flag y: interpolated value at x

Return type:

flag

eval_e_vector(x)
inputx

a vector of independent values

eval_integ(a, b)

Evaluate the integral

Parameters:
  • a – lower boundary

  • b – upper boundary

Returns:

the integral of the object over the range [a,b]

Return type:

y

eval_integ_e(a, b)
inputa, b,

a … lower boundary b … upper boundary

outputflag, y

flag error flag y … the integral of the object over the range [a,b]

eval_integ_e_vector(a, b)
inputa, b

two vector of independent values of same length

eval_integ_vector(a, b)
inputa, b

two vector of independent values of same length

eval_vector(x)
inputx

a vector of independent values

init(xa, ya)
inputxa, ya

xa … array of independent values ya … array of dependent values

This method initializes this for the data (xa,ay) where ya and ya are arrays of the size, which was set, when this object was initialised. The interpolation object copys the data arrays xa and ya and and stores the static state computed from the data. The ya data array is always assumed to be strictly ordered; the behavior for other arrangements is not defined.

min_size()

Returns the minimum number of points required by the interpolation.

name()

Returns the name of the interpolation type used

class pygsl.spline.polynomial(n)[source]

Bases: _spline

Polynomial interpolation. This method should only be used for interpolating small numbers of points because polynomial interpolation introduces large oscillations, even for well-behaved datasets. The number of terms in the interpolating polynomial is equal to the number of points.

GetAccelCObject()

Useful when using GSL in C code.

GetSplineCObject()

Useful when using GSL in C code.

accel_find(x)

This method performs a lookup action on the data array X_ARRAY of size SIZE, using the given accelerator A. This is how lookups are performed during evaluation of an interpolation. The function returns an index i such that `xarray[i] <= x < xarray[i+1]’.

accel_reset()
eval(x)

eval the interpolation at point x

Parameters:

x – value of the independent variable

Returns:

the interpolated value at x

Return type:

y

eval_deriv(x)
inputx

x … value of the independent variable

outputy

y … returns the value of the derivative at x

eval_deriv2(x)
inputx

x … value of the independent variable

outputy

y … the value of the second derivative at x

eval_deriv2_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … the value of the second derivative at x

eval_deriv2_e_vector(x)
inputx

a vector of independent values

eval_deriv2_vector(x)
inputx

a vector of independent values

eval_deriv_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … returns the value of the derivative at x

eval_deriv_e_vector(x)
inputx

a vector of independent values

eval_deriv_vector(x)
inputx

a vector of independent values

eval_e(x)

evaluate and flag error if it occurs

Parameters:

x – value of the independent variable

Returns:

error flag y: interpolated value at x

Return type:

flag

eval_e_vector(x)
inputx

a vector of independent values

eval_integ(a, b)

Evaluate the integral

Parameters:
  • a – lower boundary

  • b – upper boundary

Returns:

the integral of the object over the range [a,b]

Return type:

y

eval_integ_e(a, b)
inputa, b,

a … lower boundary b … upper boundary

outputflag, y

flag error flag y … the integral of the object over the range [a,b]

eval_integ_e_vector(a, b)
inputa, b

two vector of independent values of same length

eval_integ_vector(a, b)
inputa, b

two vector of independent values of same length

eval_vector(x)
inputx

a vector of independent values

init(xa, ya)
inputxa, ya

xa … array of independent values ya … array of dependent values

This method initializes this for the data (xa,ay) where ya and ya are arrays of the size, which was set, when this object was initialised. The interpolation object copys the data arrays xa and ya and and stores the static state computed from the data. The ya data array is always assumed to be strictly ordered; the behavior for other arrangements is not defined.

min_size()

Returns the minimum number of points required by the interpolation.

name()

Returns the name of the interpolation type used

class pygsl.spline._spline(n)[source]

Bases: _common

GetAccelCObject()[source]

Useful when using GSL in C code.

GetSplineCObject()[source]

Useful when using GSL in C code.

accel_find(x)

This method performs a lookup action on the data array X_ARRAY of size SIZE, using the given accelerator A. This is how lookups are performed during evaluation of an interpolation. The function returns an index i such that `xarray[i] <= x < xarray[i+1]’.

accel_reset()
eval(x)

eval the interpolation at point x

Parameters:

x – value of the independent variable

Returns:

the interpolated value at x

Return type:

y

eval_deriv(x)
inputx

x … value of the independent variable

outputy

y … returns the value of the derivative at x

eval_deriv2(x)
inputx

x … value of the independent variable

outputy

y … the value of the second derivative at x

eval_deriv2_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … the value of the second derivative at x

eval_deriv2_e_vector(x)[source]
inputx

a vector of independent values

eval_deriv2_vector(x)[source]
inputx

a vector of independent values

eval_deriv_e(x)
inputx

x … value of the independent variable

outputflag, y

flag error flag y … returns the value of the derivative at x

eval_deriv_e_vector(x)[source]
inputx

a vector of independent values

eval_deriv_vector(x)[source]
inputx

a vector of independent values

eval_e(x)

evaluate and flag error if it occurs

Parameters:

x – value of the independent variable

Returns:

error flag y: interpolated value at x

Return type:

flag

eval_e_vector(x)[source]
inputx

a vector of independent values

eval_integ(a, b)

Evaluate the integral

Parameters:
  • a – lower boundary

  • b – upper boundary

Returns:

the integral of the object over the range [a,b]

Return type:

y

eval_integ_e(a, b)
inputa, b,

a … lower boundary b … upper boundary

outputflag, y

flag error flag y … the integral of the object over the range [a,b]

eval_integ_e_vector(a, b)[source]
inputa, b

two vector of independent values of same length

eval_integ_vector(a, b)[source]
inputa, b

two vector of independent values of same length

eval_vector(x)[source]
inputx

a vector of independent values

init(xa, ya)[source]
inputxa, ya

xa … array of independent values ya … array of dependent values

This method initializes this for the data (xa,ay) where ya and ya are arrays of the size, which was set, when this object was initialised. The interpolation object copys the data arrays xa and ya and and stores the static state computed from the data. The ya data array is always assumed to be strictly ordered; the behavior for other arrangements is not defined.

min_size()

Returns the minimum number of points required by the interpolation.

name()[source]

Returns the name of the interpolation type used

interpolation2d

Wrapper for the 2D interpolation

References to the arrays are kept within the interp2d (swig) class next to the accelerator objects.

class pygsl.interpolation2d.bicubic(x_size, y_size)[source]

Bases: interp2d

class pygsl.interpolation2d.bilinear(x_size, y_size)[source]

Bases: interp2d

deriv

Numerical differentation

This module allows to differentiate functions numerically. It provides the following functions:

backward central forward

All have the same usage:
func(callback, x, h, [args])
callback … foo(x, args):

… some calculation here … return y

x … the position where to differentate the callback h … initial step size used to calculate the optimal one args … additional object to be passed to the function.

It is optional. In this case None is passed as args to foo

chebyshev

Chebyshev approximation

This module describes routines for computing Chebyshev approximations to univariate functions. A Chebyshev approximation is a truncation of the series \(\M{f(x) = S{sum} c_n T_n(x)}\), where the Chebyshev polynomials \(\M{T_n(x) = cos(n \arccos x)}\) provide an orthogonal basis of polynomials on the interval [-1,1] with the weight function \(\M{1 / sqrt{1-x^2}}\). The first few Chebyshev polynomials are, \(T_0(x) = 1\), \(T_1(x) = x\), \(T_2(x) = 2 x^2 - 1\).

::
def f(x, p):
if x < 0.5:

return 0.25

else:

return 0.75

n = 10000;

cs = cheb_series(40) F = gsl_function(f, None) cs.init(F, 0.0, 1.0)

nf = float(n) for i in range(100):

x = i / nf r10 = cs.eval_n(10, x) r40 = cs.eval(x) print “%g %g %g %g” % (x, f(x, None), r10, r40)

class pygsl.chebyshev.cheb_series(size)[source]

Bases: _workspace

Chebyshev series class

This class manages all internal detail. It provides the space for a Chebyshev series of order N.

calc_deriv()[source]

compute the derivative of the series CS. It returns a new instance of the cheb_series class.

calc_integ()[source]

Computes the integral of the series CS. It returns a new instance of the cheb_series class.

eval(x)[source]

evaluates the Chebyshev series CS at a given point x

Parameters:

x – value where the series shall be evaluated.

Returns:

interpolation value

eval_err(x)[source]
computes the Chebyshev series at a given point x,

estimating both the series result and its absolute error abserr.

The error estimate is made from the first neglected term in the series.

Args:

x: value where the error shall be evaluated.

Returns:

interpolation value abserr estimate of the error

Return type:

result

eval_n(order, x)[source]

evaluates the Chebyshev series CS at a given point x, to (at most) the given order.

Args :

order: number of cooefficients x : value where the series shall be evaluated.

eval_n_err(order, x)[source]

evaluates acChebyshev series CS at a given point x, estimating both the series result and its absolute error abserr, to (at most) the given order order. The error estimate is made from the first neglected term in the series.

Args :

order: number of cooefficients x : value where the error shall be evaluated.

get_a()[source]

Get the lower boundary of the current representation

get_b()[source]

Get the upper boundary of the current representation

get_coefficients()[source]

get the chebyshev coefficients.

get_f()[source]

Get the value f (what is it ?) The documentation does not tell anything about it.

get_order_sp()[source]

Get the value f (what is it ?) The documentation does not tell anything about it.

init(f, a, b)[source]

computes the Chebyshev approximation for the function F over the range (a,b) to the previously specified order.

The computation of the Chebyshev approximation is an M{O(n^2)} process, and requires n function evaluations.

Parameters:
  • f – a gsl_function

  • a – lower limit

  • b – upper limit

set_a(a)[source]

Set the lower boundary of the current representation

set_b(a)[source]

Set the upper boundary of the current representation

set_coefficients(coefs)[source]

Allows to set the chebyshev coefficients.

set_f(a)[source]

Set the value f (what is it ?)

set_order_sp(a)[source]

Set the value f (what is it ?)

sum

Sum modul for Levin u-transform

This module provides a function for accelerating the convergence of series based on the Levin u-transform. This method takes a small number of terms from the start of a series and uses a systematic approximation to compute an extrapolated value and an estimate of its error. The u-transform works for both convergent and divergent series, including asymptotic series.

pygsl.sum.levin_sum(a, truncate=False, info_dict=None)[source]

Return (sum(a), err) where sum(a) is the extrapolated sum of the infinite series a and err is an error estimate.

Uses the Levin u-transform method.

Parameters:
  • a – A list or array of floating point numbers assumed to be the first terms in a series.

  • truncate – If True, then use a more efficient algorithm, but with a less accurate error estimate

  • info_dict – If info_dict is provided, then two entries will be added: ‘terms_used’ will be the number of terms used and ‘sum_plain’ will be the sum of these terms without acceleration.

Notes: The error estimate is made assuming that the terms a are computed to machined precision.

Example: Computing the zeta function zeta(2) = 1/1**2 + 1/2**2 + 1/3**2 + … = pi**2/6

>>> from math import pi
>>> zeta_2 = pi**2/6
>>> a = [1.0/n**2 for n in range(1,21)]
>>> info_dict = {}
>>> (ans, err_est) = levin_sum(a, info_dict=info_dict)
>>> ans, zeta_2
1.644934066..., 1.644934066...
>>> err = abs(ans - zeta_2)
>>> err < err_est
True
>>> (ans, err_est) = levin_sum(a, truncate=False)
>>> ans
1.644934066...

wavelet

Wavelet transfroms as provided by GSL

hankel

roots

Wrapper over the functions as described in Chapter 31 of the reference manual.

Routines for finding the root of a function of one variable.

Example: searching the root of a quadratic using brent:

def quadratic(x, params):

a = params[0] b = params[1] c = params[2] return a * x ** 2 + b * x + c

a = 1.0 b = 0.0 c = -5.0 sys = gsl_function(quadratic, (a,b,c)) solver = brent(sys) while 1:

iter += 1 status = solver.iterate() x_lo = solver.x_lower() x_up = solver.x_upper() status = roots.test_interval(x_lo, x_up, 0, 0.001) r = solver.root() if status == 0:

break

print “Root Found =”, root

class pygsl.roots.bisection(system)[source]

Bases: _fsolver

The “bisection algorithm” is the simplest method of bracketing the

roots of a function. It is the slowest algorithm provided by the library, with linear convergence.

On each iteration, the interval is bisected and the value of the function at the midpoint is calculated. The sign of this value is used to determine which half of the interval does not contain a root. That half is discarded to give a new, smaller interval containing the root. This procedure can be continued indefinitely until the interval is sufficiently small.

At any time the current estimate of the root is taken as the midpoint of the interval.

type = <Swig Object of type 'gsl_root_fsolver_type *'>
class pygsl.roots.brent(system)[source]

Bases: _fsolver

The “Brent-Dekker method” (referred to here as “Brent’s method”)

combines an interpolation strategy with the bisection algorithm. This produces a fast algorithm which is still robust.

On each iteration Brent’s method approximates the function using an interpolating curve. On the first iteration this is a linear interpolation of the two endpoints. For subsequent iterations the algorithm uses an inverse quadratic fit to the last three points, for higher accuracy. The intercept of the interpolating curve with the x-axis is taken as a guess for the root. If it lies within the bounds of the current interval then the interpolating point is accepted, and used to generate a smaller interval. If the interpolating point is not accepted then the algorithm falls back to an ordinary bisection step.

The best estimate of the root is taken from the most recent interpolation or bisection.

type = <Swig Object of type 'gsl_root_fsolver_type *'>
class pygsl.roots.falsepos(system)[source]

Bases: _fsolver

The “false position algorithm” is a method of finding roots based on linear interpolation. Its convergence is linear, but it is usually faster than bisection.

On each iteration a line is drawn between the endpoints (a,f(a)) and (b,f(b)) and the point where this line crosses the x-axis taken as a “midpoint”. The value of the function at this point is calculated and its sign is used to determine which side of the interval does not contain a root. That side is discarded to give a new, smaller interval containing the root. This procedure can be continued indefinitely until the interval is sufficiently small.

The best estimate of the root is taken from the linear interpolation of the interval on the current iteration.

type = <Swig Object of type 'gsl_root_fsolver_type *'>
class pygsl.roots.newton(system)[source]

Bases: _fdfsolver

Newton’s Method is the standard root-polishing algorithm. The algorithm begins with an initial guess for the location of the root. On each iteration, a line tangent to the function f is drawn at that position. The point where this line crosses the x-axis becomes the new guess. The iteration is defined by the following sequence,

x_{i+1} = x_i - f(x_i)/f’(x_i)

Newton’s method converges quadratically for single roots, and linearly for multiple roots.

type = <Swig Object of type 'gsl_root_fdfsolver_type *'>
class pygsl.roots.secant(system)[source]

Bases: _fdfsolver

The “secant method” is a simplified version of Newton’s method does

not require the computation of the derivative on every step.

On its first iteration the algorithm begins with Newton’s method, using the derivative to compute a first step,

x_1 = x_0 - f(x_0)/f’(x_0)

Subsequent iterations avoid the evaluation of the derivative by replacing it with a numerical estimate, the slope through the previous two points,

x_{i+1} = x_i f(x_i) / f’_{est} where

f’_{est} = (f(x_i) - f(x_{i-1})/(x_i - x_{i-1})

When the derivative does not change significantly in the vicinity of the root the secant method gives a useful saving. Asymptotically the secant method is faster than Newton’s method whenever the cost of evaluating the derivative is more than 0.44 times the cost of evaluating the function itself. As with all methods of computing a numerical derivative the estimate can suffer from cancellation errors if the separation of the points becomes too small.

On single roots, the method has a convergence of order (1 + sqrt 5)/2 (approximately 1.62). It converges linearly for multiple roots.

type = <Swig Object of type 'gsl_root_fdfsolver_type *'>
class pygsl.roots.steffenson(system)[source]

Bases: _fdfsolver

The “Steffenson Method” provides the fastest convergence of all the

routines. It combines the basic Newton algorithm with an Aitken “delta-squared” acceleration. If the Newton iterates are x_i then the acceleration procedure generates a new sequence R_i,

R_i = x_i - (x_{i+1} - x_i)^2 / (x_{i+2} - 2 x_{i+1} + x_{i})

which converges faster than the original sequence under reasonable conditions. The new sequence requires three terms before it can produce its first value so the method returns accelerated values on the second and subsequent iterations. On the first iteration it returns the ordinary Newton estimate. The Newton iterate is also returned if the denominator of the acceleration term ever becomes zero.

As with all acceleration procedures this method can become unstable if the function is not well-behaved.

type = <Swig Object of type 'gsl_root_fdfsolver_type *'>
pygsl.roots.test_delta(x_lower, x_upper, eps_abs, eps_rel)[source]
his function tests the residual value F against the absolute

error bound EPSABS. The test returns `GSL_SUCCESS’ if the following condition is achieved,

|f| < epsabs

and returns `GSL_CONTINUE’ otherwise. This criterion is suitable for situations where the precise location of the root, x, is unimportant provided a value can be found where the residual, |f(x)|, is small enough.

input : x_lower, x_upper, eps_abs, eps_rel

pygsl.roots.test_interval(x_lower, x_upper, eps_abs, eps_rel)[source]

This function tests for the convergence of the interval [X_LOWER, X_UPPER] with absolute error EPSABS and relative error EPSREL. The test returns `GSL_SUCCESS’ if the following condition is achieved,

|a - b| < epsabs + epsrel min(|a|,|b|)

when the interval x = [a,b] does not include the origin. If the interval includes the origin then min(|a|,|b|) is replaced by zero (which is the minimum value of |x| over the interval). This ensures that the relative error is accurately estimated for roots close to the origin.

This condition on the interval also implies that any estimate of the root r in the interval satisfies the same condition with respect to the true root r^*,

|r - r^*| < epsabs + epsrel r^*

assuming that the true root r^* is contained within the interval.

input : x_lower, x_upper, eps_abs, eps_rel

class pygsl.roots._fsolver(system)[source]

Bases: _generic_solver

root()[source]

Get the actual guess for the root

set(x_lower, x_upper)[source]

Set the bondary for the solver. input : x_lower, x_upper

x_lower : the lower bound x_upper : the upper bound

type = None
x_lower()[source]

Get the lower bound of the actual interval

x_upper()[source]

Get the upper bound of the actual interval

minimize

Wrapper over the functions as described in Chapter 32 of the reference manual.

Routines for finding the minimum of a function of one variable. Example: searching for pi using brent:

m = 2.0 a = 0.0 b = 6.0

def fn1(x, params):

return cos(x) + 1.0

self.sys = gsl_function(fn1, None) minimizer = brent(self.sys)

minimizer.set(m, a, b) t1 = fn1(a, None) t2 = fn1(b, None)

print “Testing minimizer “, minimizer.name() for iter in range(100):

status = minimizer.iterate() a = minimizer.x_lower() b = minimizer.x_upper() m = minimizer.minimum() status = minimize.test_interval(a, b, 0.001, 0) if status == 0:

break

print “Minimum found at “, m

class pygsl.minimize.brent(system)[source]

Bases: _minsolver

The “Brent minimization algorithm” combines a parabolic interpolation with the golden section algorithm. This produces a fast algorithm which is still robust.

The outline of the algorithm can be summarized as follows: on each iteration Brent’s method approximates the function using an interpolating parabola through three existing points. The minimum of the parabola is taken as a guess for the minimum. If it lies within the bounds of the current interval then the interpolating point is accepted, and used to generate a smaller interval. If the interpolating point is not accepted then the algorithm falls back to an ordinary golden section step. The full details of Brent’s method include some additional checks to improve convergence.

type = <Swig Object of type 'gsl_min_fminimizer_type *'>
class pygsl.minimize.goldensection(system)[source]

Bases: _minsolver

The “golden section algorithm” is the simplest method of bracketing the minimum of a function. It is the slowest algorithm provided by the library, with linear convergence.

On each iteration, the algorithm first compares the subintervals from the endpoints to the current minimum. The larger subinterval is divided in a golden section (using the famous ratio (3-sqrt 5)/2 = 0.3189660…) and the value of the function at this new point is calculated. The new value is used with the constraint f(a’) > f(x’) < f(b’) to a select new interval containing the minimum, by discarding the least useful point. This procedure can be continued indefinitely until the interval is sufficiently small. Choosing the golden section as the bisection ratio can be shown to provide the fastest convergence for this type of algorithm.

type = <Swig Object of type 'gsl_min_fminimizer_type *'>
pygsl.minimize.test_interval(x_lower, x_upper, epsabs, epsrel)[source]
This function tests for the convergence of the interval [X_LOWER,

X_UPPER] with absolute error EPSABS and relative error EPSREL. The test returns `GSL_SUCCESS’ if the following condition is achieved,

|a - b| < epsabs + epsrel min(|a|,|b|)

when the interval x = [a,b] does not include the origin. If the interval includes the origin then min(|a|,|b|) is replaced by zero (which is the minimum value of |x| over the interval). This ensures that the relative error is accurately estimated for minima close to the origin.

This condition on the interval also implies that any estimate of the minimum x_m in the interval satisfies the same condition with respect to the true minimum x_m^*,

|x_m - x_m^*| < epsabs + epsrel x_m^*

assuming that the true minimum x_m^* is contained within the interval.

input : x_lower, x_upper, eps_abs, eps_rel

class pygsl.minimize._minsolver(system)[source]

Bases: _generic_solver

minimum()[source]

Get the current estimation for the minimum

set(x, x_lower, x_upper)[source]

This function sets, or resets, an existing minimizer S to use the function F and the initial search interval [X_LOWER, X_UPPER], with a guess for the location of the minimum X_MINIMUM.

If the interval given does not contain a minimum, then the method raises an exception.

inputx, x_lower, x_upper

x … inital guess for x x_lower … the lower bound of the search interval x_upper … the upper bound of the search interval

set_with_values(x_m, x_lower, x_upper, f_m, f_lower, f_upper)[source]

This method is equat to the set method but uses the values F_MINIMUM, F_LOWER and F_UPPER instead of computing them internaly.

inputx, x_lower, x_upper, f_minimum, f_lower, f_upper

x … inital guess for x x_lower … the lower bound of the search interval x_upper … the upper bound of the search interval f … f(x) f_lower … f(x_lower) f_upper … f(x_upper)

type = None
x_lower()[source]

Get the lower bound

x_upper()[source]

Get the upper bound

multiroots

Wrapper over the functions as described in Chapter 33 of the reference manual.

Routines for finding the root of a function depending on more than one variable.

class pygsl.multiroots.broyden(system, size)[source]

Bases: _fsolver

The “Broyden algorithm” is a version of the discrete Newton

algorithm which attempts to avoids the expensive update of the Jacobian matrix on each iteration. The changes to the Jacobian are also approximated, using a rank-1 update,

J^{-1} to J^{-1} - (J^{-1} df - dx) dx^T J^{-1} / dx^T J^{-1} df

where the vectors dx and df are the changes in x and f. On the first iteration the inverse Jacobian is estimated using finite differences, as in the discrete Newton algorithm.

This approximation gives a fast update but is unreliable if the changes are not small, and the estimate of the inverse Jacobian becomes worse as time passes. The algorithm has a tendency to become unstable unless it starts close to the root. The Jacobian is refreshed if this instability is detected (consult the source for details).

This algorithm is not recommended and is included only for demonstration purposes.

type = <Swig Object of type 'gsl_multiroot_fsolver_type *'>
class pygsl.multiroots.dnewton(system, size)[source]

Bases: _fsolver

The “discrete Newton algorithm” is the simplest method of solving a

multidimensional system. It uses the Newton iteration

x -> x - J^{-1} f(x)

where the Jacobian matrix J is approximated by taking finite differences of the function F. The approximation scheme used by this implementation is,

J_{ij} = (f_i(x + delta_j) - f_i(x)) / delta_j

where delta_j is a step of size sqrtepsilon |x_j| with epsilon being the machine precision (epsilon approx 2.22 times 10^-16). The order of convergence of Newton’s algorithm is quadratic, but the finite differences require n^2 function evaluations on each iteration. The algorithm may become unstable if the finite differences are not a good approximation to the true derivatives.

type = <Swig Object of type 'gsl_multiroot_fsolver_type *'>
class pygsl.multiroots.gnewton(system, size)[source]

Bases: _fdfsolver

This is a modified version of Newton’s method which attempts to

improve global convergence by requiring every step to reduce the Euclidean norm of the residual, |f(x)|. If the Newton step leads to an increase in the norm then a reduced step of relative size,

t = (sqrt(1 + 6 r) - 1) / (3 r)

is proposed, with r being the ratio of norms |f(x’)|^2/|f(x)|^2. This procedure is repeated until a suitable step size is found.

type = <Swig Object of type 'gsl_multiroot_fdfsolver_type *'>
class pygsl.multiroots.hybrid(system, size)[source]

Bases: _fsolver

This is a finite difference version of the Hybrid algorithm without internal scaling.

type = <Swig Object of type 'gsl_multiroot_fsolver_type *'>
class pygsl.multiroots.hybridj(system, size)[source]

Bases: _fdfsolver

This algorithm is an unscaled version of `hybridsj’. The steps are

controlled by a spherical trust region |x' - x| < delta, instead of a generalized region. This can be useful if the generalized region estimated by `hybridsj’ is inappropriate.

type = <Swig Object of type 'gsl_multiroot_fdfsolver_type *'>
class pygsl.multiroots.hybrids(system, size)[source]

Bases: _fsolver

This is a version of the Hybrid algorithm which replaces calls to the Jacobian function by its finite difference approximation. The finite difference approximation is computed using `gsl_multiroots_fdjac’ with a relative step size of `GSL_SQRT_DBL_EPSILON’.

type = <Swig Object of type 'gsl_multiroot_fsolver_type *'>
class pygsl.multiroots.hybridsj(system, size)[source]

Bases: _fdfsolver

This is a modified version of Powell’s Hybrid method as

implemented in the HYBRJ algorithm in MINPACK. Minpack was written by Jorge J. More’, Burton S. Garbow and Kenneth E. Hillstrom. The Hybrid algorithm retains the fast convergence of Newton’s method but will also reduce the residual when Newton’s method is unreliable.

The algorithm uses a generalized trust region to keep each step under control. In order to be accepted a proposed new position x’ must satisfy the condition |D (x' - x)| < delta, where D is a diagonal scaling matrix and delta is the size of the trust region. The components of D are computed internally, using the column norms of the Jacobian to estimate the sensitivity of the residual to each component of x. This improves the behavior of the algorithm for badly scaled functions.

On each iteration the algorithm first determines the standard Newton step by solving the system J dx = - f. If this step falls inside the trust region it is used as a trial step in the next stage. If not, the algorithm uses the linear combination of the Newton and gradient directions which is predicted to minimize the norm of the function while staying inside the trust region.

dx = - alpha J^{-1} f(x) - beta nabla |f(x)|^2

This combination of Newton and gradient directions is referred to as a “dogleg step”.

The proposed step is now tested by evaluating the function at the resulting point, x’. If the step reduces the norm of the function sufficiently then it is accepted and size of the trust region is increased. If the proposed step fails to improve the solution then the size of the trust region is decreased and another trial step is computed.

The speed of the algorithm is increased by computing the changes to the Jacobian approximately, using a rank-1 update. If two successive attempts fail to reduce the residual then the full Jacobian is recomputed. The algorithm also monitors the progress of the solution and returns an error if several steps fail to make any improvement,

`GSL_ENOPROG’

the iteration is not making any progress, preventing the algorithm from continuing.

`GSL_ENOPROGJ’

re-evaluations of the Jacobian indicate that the iteration is not making any progress, preventing the algorithm from continuing.

type = <Swig Object of type 'gsl_multiroot_fdfsolver_type *'>
class pygsl.multiroots.newton(system, size)[source]

Bases: _fdfsolver

Newton’s Method is the standard root-polishing algorithm. The

algorithm begins with an initial guess for the location of the solution. On each iteration a linear approximation to the function F is used to estimate the step which will zero all the components of the residual. The iteration is defined by the following sequence,

x -> x’ = x - J^{-1} f(x)

where the Jacobian matrix J is computed from the derivative functions provided by F. The step dx is obtained by solving the linear system,

J dx = - f(x)

using LU decomposition.

type = <Swig Object of type 'gsl_multiroot_fdfsolver_type *'>
pygsl.multiroots.test_delta(dx, x, epsabs, epsrel)[source]
This function tests for the convergence of the sequence by

comparing the last step DX with the absolute error EPSABS and relative error EPSREL to the current position X. The test returns `GSL_SUCCESS’ if the following condition is achieved,

|dx_i| < epsabs + epsrel |x_i|

for each component of X and returns `GSL_CONTINUE’ otherwise.

input : dx, x, epsabs, epsrel

pygsl.multiroots.test_residual(f, epsabs)[source]
This function tests the residual value F against the absolute

error bound EPSABS. The test returns `GSL_SUCCESS’ if the following condition is achieved,

sum_i |f_i| < epsabs

and returns `GSL_CONTINUE’ otherwise. This criterion is suitable for situations where the precise location of the root, x, is unimportant provided a value can be found where the residual is small enough.

input : f, epsabs

class pygsl.multiroots._fsolver(system, size)[source]

Bases: _generic_solver

getf()[source]

Get the value of f

getx()[source]

Get the value of x

root()[source]

Get the current root estimate

set(x)[source]

Set the initial start guess x

type = None
class pygsl.multiroots._fdfsolver(system, size)[source]

Bases: _fsolver

type = None

multiminimize

Wrapper over the functions as described in Chapter 33 of the reference manual.

Routines for finding the minimum of a function depending on more than one variable.

class pygsl.multiminimize.conjugate_fr(system, size)[source]

Bases: _fdfsolver

This is the Fletcher-Reeves conjugate gradient algorithm. The conjugate gradient algorithm proceeds as a succession of line minimizations. The sequence of search directions is used to build up an approximation to the curvature of the function in the neighborhood of the minimum. An initial search direction P is chosen using the gradient and line minimization is carried out in that direction. The accuracy of the line minimization is specified by the parameter TOL. At the minimum along this line the function gradient G and the search direction P are orthogonal. The line minimization terminates when dot(p,g) < tol |p| |g|. The search direction is updated using the Fletcher-Reeves formula p’ = g’ - eta g where eta=-|g’|^2/|g|^2, and the line minimization is then repeated for the new search direction.

type = <Swig Object of type 'gsl_multimin_fdfminimizer_type *'>
class pygsl.multiminimize.conjugate_pr(system, size)[source]

Bases: _fdfsolver

This is the Polak-Ribiere conjugate gradient algorithm. It is

similar to the Fletcher-Reeves method, differing only in the choice of the coefficient eta. Both methods work well when the evaluation point is close enough to the minimum of the objective function that it is well approximated by a quadratic hypersurface.

type = <Swig Object of type 'gsl_multimin_fdfminimizer_type *'>
class pygsl.multiminimize.nmsimplex(system, size)[source]

Bases: _fsolver

This is the Simplex algorithm by Nelder and Mead. It constructs n vectors p_i from the starting vector X as follows:

that form the n+1 vertices of a simplex in n dimensions. In each iteration step the algorithm tries to improve the parameter vector p_i corresponding to the highest, i. e. worst, function value by simple geometrical transformations. These are reflection, reflection followed by expansion, contraction and multiple contraction. Using these transformations the simplex moves through the parameter space towards the minimum, where it contracts itself.

After each iteration, the best vertex is returned. Note, that due to the nature of the algorithm (getting rid of the worst estimate), every iteration doesn’t necessarily improve the current best parameter vector. Usually several iterations are required.

The routine calculates the minimizer specific characteristic size as the average distance from the geometrical center of the simplex to all its vertices. This size can be used as a stopping criteria, as the simplex contracts itself near the minimum. The size is returned by the function `gsl_multimin_fminimizer_size’.

type = <Swig Object of type 'gsl_multimin_fminimizer_type *'>
class pygsl.multiminimize.steepest_descent(system, size)[source]

Bases: _fdfsolver

The steepest descent algorithm follows the downhill gradient of the

function at each step. When a downhill step is successful the step-size is increased by factor of two. If the downhill step leads to a higher function value then the algorithm backtracks and the step size is decreased using the parameter TOL. A suitable value of TOL for most applications is 0.1. The steepest descent method is inefficient and is included only for demonstration purposes.

type = <Swig Object of type 'gsl_multimin_fdfminimizer_type *'>
pygsl.multiminimize.test_gradient(g, epsabs)[source]

This function tests the norm of the gradient against the absolute tolerance epsabs. The gradient of a multidimensional function goes to zero at a minimum. The test returns `GSL_SUCCESS’ if the following condition is achieved,

|g| < epsabs

and returns `GSL_CONTINUE’ otherwise. A suitable choice of EPSABS can be made from the desired accuracy in the function for small variations in x. The relationship between these quantities is given by delta f = g delta x.

pygsl.multiminimize.test_size(gradient, tolerance)[source]

This function tests the minimizer specific characteristic size (if applicable to the used minimizer) against the absolute tolerance.

class pygsl.multiminimize.vector_bfgs(system, size)[source]

Bases: _fdfsolver

This is the vector Broyden-Fletcher-Goldfarb-Shanno (BFGS)

conjugate gradient algorithm. It is a quasi-Newton method which builds up an approximation to the second derivatives of the function f using the difference between successive gradient vectors. By combining the first and second derivatives the algorithm is able to take Newton-type steps towards the function minimum, assuming quadratic behavior in that region.

type = <Swig Object of type 'gsl_multimin_fdfminimizer_type *'>
class pygsl.multiminimize.vector_bfgs2(system, size)[source]

Bases: _fdfsolver

type = <Swig Object of type 'gsl_multimin_fdfminimizer_type *'>
class pygsl.multiminimize._fsolver(system, size)[source]

Bases: _generic_solver

getf()[source]

Get the current function value

getx()[source]

Get the current x value

minimum()[source]

Get the current minimum

set(x, step_size)[source]

This function initializes the minimizer to minimize the function starting from the initial point x. The size of the initial trial steps is given in vector STEP_SIZE. The precise meaning of this parameter depends on the method used.

size()[source]

Get the characteristic size

type = None
class pygsl.multiminimize._fdfsolver(system, size)[source]

Bases: _fsolver

gradient()[source]

Get the last gradient

restart()[source]

Restart the iteration at the current point

set(x, step_size, tolerance)[source]

This function initializes the minimizer S to minimize the function FDF starting from the initial point X. The size of the first trial step is given by STEP_SIZE. The accuracy of the line minimization is specified by TOL. The precise meaning of this parameter depends on the method used. Typically the line minimization is considered successful if the gradient of the function g is orthogonal to the current search direction p to a relative accuracy of TOL, where dot(p,g) < tol |p| |g|.

type = None

fit

The functions described in this section can be used to perform least-squares fits to a straight line model, .. math:: Y = c_0 + c_1 X.

For weighted data the best-fit is found by minimizing the weighted sum of squared residuals, \(\chi^2\),

\[\chi^2 = \sum_i w_i (y_i - (c_0 + c_1 x_i))^2\]

for the parameters c_0, c_1. For unweighted data the sum is computed with w_i = 1.

pygsl.fit.est(x, c0, c1, c00, c01, c10)[source]

return the estimation at point x

Parameters:
  • x – independent data

  • c0 – fit coefficient (intercept)

  • c1 – fit coefficient (slope)

  • c00 – covariance - variance matrix coefficient

  • c01 – covariance - variance matrix coefficient

  • c11 – covariance - variance matrix coefficient

Returns:

y double: y_err

Return type:

double

wrapper of the function gsl_fit_linear_est()

This function uses the best-fit linear regression coefficients

C0,C1 and their estimated covariance COV00,COV01,COV11 to compute the fitted function Y and its standard deviation Y_ERR for the model Y = c_0 + c_1 X at the point X.

pygsl.fit.linear(x, y)[source]

Computes the best fit linear regression

Parameters:
  • data (y ... dependent)

  • data

Returns:

((C0, C1), (COV00, COV01, COV11), sumsq)

Return type:

tuple

wrapper of the function gsl_fit_linear()

This function computes the best-fit linear regression coefficients (C0,C1) of the model Y = c_0 + c_1 X for the datasets (X, Y). The variance-covariance matrix for the parameters (C0, C1) is estimated from the scatter of the points around the best-fit line and returned via the parameters (COV00, COV01, COV11). The sum of squares of the residuals from the best-fit line is returned in SUMSQ.

pygsl.fit.mul(x, y)[source]

compute best linear regression (without abszissa)

Parameters:
  • x – independent data

  • y – dependent data

Returns:

(C1, COV11, sumsq)

Return type:

tuple

wrapper of the function gsl_fit_mul()

This function computes the best-fit linear regression coefficient C1 of the model Y = c_1 X for the datasets (X, Y). The variance of the parameter C1 is estimated from the scatter of the points around the best-fit line and returned via the parameter COV11. The sum of squares of the residuals from the best-fit line is returned in SUMSQ.

pygsl.fit.mul_est(x, c1, c11)[source]
Parameters:
  • x – independent data

  • c1 – fit coefficient (slope)

  • c11 – covariance - variance matrix coefficient

Returns:

y y_err

wrapper of the function gsl_fit_mul_est()

This function uses the best-fit linear regression coefficient C1 and its estimated covariance COV11 to compute the fitted function Y and its standard deviation Y_ERR for the model Y = c_1 X at the point X.

pygsl.fit.wlinear(x, y, w)[source]

Weighted linear fit

Parameters:
  • data (w ... weights for the dependent)

  • data

  • data

Returns:

((C0, C1), (COV00, COV01, COV11), sumsq)

Return type:

tuple

wrapper of the function gsl_fit_wlinear()

This function computes the best-fit linear regression coefficients (C0,C1) of the model Y = c_0 + c_1 X for the weighted datasets (X, Y). The vector W specifies the weight of each datapoint. The weight is the reciprocal of the variance for each datapoint in Y.

The covariance matrix for the parameters (C0, C1) is estimated from weighted data and returned via the parameters (COV00, COV01, COV11). The weighted sum of squares of the residuals from the best-fit line, chi^2, is returned in CHISQ.

pygsl.fit.wmul(x, y, w)[source]

compute weighted best linear regression (without abszissa)

Parameters:
  • x – independent data

  • y – dependent data

  • w – weights for the dependent data

Returns:

(C1, COV11, sumsq)

Return type:

tuple

wrapper of the function gsl_fit_wmul()

This function computes the best-fit linear regression coefficient C1 of the model Y = c_1 X for the weighted datasets (X, Y). The vector W, of length N and stride WSTRIDE, specifies the weight of each datapoint. The weight is the reciprocal of the variance for each datapoint in Y.

The variance of the parameter C1 is estimated from the weighted data and returned via the parameters COV11. The weighted sum of squares of the residuals from the best-fit line, chi^2, is returned in CHISQ.

multifit

The functions described in this section perform least-squares fits

to a general linear model, y = X c where y is a vector of n observations, X is an n by p matrix of predictor variables, and c are the p unknown best-fit parameters, which are to be estimated.

The best-fit is found by minimizing the weighted sums of squared

residuals, chi^2,

chi^2 = (y - X c)^T W (y - X c)

with respect to the parameters c. The weights are specified by the diagonal elements of the n by n matrix W. For unweighted data W is replaced by the identity matrix.

This formulation can be used for fits to any number of functions

and/or variables by preparing the n-by-p matrix X appropriately. For example, to fit to a p-th order polynomial in X, use the following matrix,

X_{ij} = x_i^j

where the index i runs over the observations and the index j runs from 0 to p-1.

To fit to a set of p sinusoidal functions with fixed frequencies

omega_1, omega_2, …, omega_p, use,

X_{ij} = sin(omega_j x_i)

To fit to p independent variables x_1, x_2, …, x_p, use,

X_{ij} = x_j(i)

where x_j(i) is the i-th value of the predictor variable x_j.

The functions described in this section are declared in the header

file `gsl_multifit.h’.

The solution of the general linear least-squares system requires an

additional working space for intermediate results, such as the singular value decomposition of the matrix X.

pygsl.multifit.linear(X, y, work=None)[source]

This function computes the best-fit parameters C of the model y = X c for the observations Y and the matrix of predictor variables X. The variance-covariance matrix of the model parameters COV is estimated from the scatter of the observations about the best-fit. The sum of squares of the residuals from the best-fit, chi^2, is returned in CHISQ.

The best-fit is found by singular value decomposition of the matrix X using the preallocated workspace provided in WORK. The modified Golub-Reinsch SVD algorithm is used, with column scaling to improve the accuracy of the singular values. Any components which have zero singular value (to machine precision) are discarded from the fit.

If work is None, the approbriate workspace will be allocated automatically

pygsl.multifit.linear_est(x, c, cov)[source]

This function uses the best-fit multilinear regression coefficients c and their covariance matrix cov to compute the fitted function value y and its standard deviation y_err for the model y = x.c at the point X.

pygsl.multifit.linear_est_matrix(X, c, cov)[source]

This function is similar to linear_est, but instead of a vector x it iterates over a matrix X

pygsl.multifit.linear_svd(X, y, tol, work=None)[source]
pygsl.multifit.linear_usvd(X, y, tol, work=None)[source]
class pygsl.multifit.linear_workspace(n, p)[source]

Bases: _workspace

Class handling the workspace required for fitting.

pygsl.multifit.wlinear(X, w, y, work=None)[source]

This function computes the best-fit parameters C of the model y = X c for the observations Y and the matrix of predictor variables X. The covariance matrix of the model parameters COV is estimated from the weighted data. The weighted sum of squares of the residuals from the best-fit, chi^2, is returned in CHISQ.

The best-fit is found by singular value decomposition of the matrix X using the preallocated workspace provided in WORK. Any components which have zero singular value (to machine precision) are discarded from the fit.

If work is None, the approbriate workspace will be allocated automatically

pygsl.multifit.wlinear_svd(X, y, w, work=None)[source]

Similar to wlinear, except that this function returns

pygsl.multifit.wlinear_usvd(X, y, w, tol, work=None)[source]

Similar to wlinear, except that this function returns

multifit_nlin

Wrapper over the functions as described in Chapter 33 of the reference manual.

Routines for approximating a data set with a non linear function

pygsl.multifit_nlin.covar(J, epsrel)[source]

compute the covariance matrix from the Jacobian J

This function uses the Jacobian matrix J to compute the covariance matrix of the best-fit parameters, COVAR. The parameter EPSREL is used to remove linear-dependent columns when J is rank deficient.

The covariance matrix is given by,

covar = :math:`(J^T J)^{-1}

and is computed by QR decomposition of J with column-pivoting. Any columns of R which satisfy

\[|R_{kk}| <= epsrel |R_{11}|\]

are considered linearly-dependent and are excluded from the covariance matrix (the corresponding rows and columns of the covariance matrix are set to zero).

Parameters:
  • J – Jacobian matrix

  • epsrel

pygsl.multifit_nlin.gradient(J, f)[source]

computes the gradient

This function computes the gradient G of \(\Phi(x) = (1/2) ||F(x)||^2\) from the Jacobian matrix J and the function values F, using the formula \(g = J^T f\).

class pygsl.multifit_nlin.lmder(system, n, p)[source]

Bases: _fdfsolver

unscaled scaled Levenberg-Marquardt solver

This is an unscaled version of the LMDER algorithm. The elements of the diagonal scaling matrix D are set to 1. This algorithm may be useful in circumstances where the scaled version of LMDER converges too slowly, or the function is already scaled appropriately.

See also gsl_multifit_fdfsolver_lmder

type = <Swig Object of type 'gsl_multifit_fdfsolver_type *'>
class pygsl.multifit_nlin.lmniel(system, n, p)[source]

Bases: _fdfsolver

Levenberg-Marquardt solver

This is a Levenberg-Marquardt solver based on a smoother updating procedure for the damping parameter mu proposed by Nielsen, 1999. It does not use a trust region approach and only performs rudimentary scaling and is therefore not as robust as lmsder. However, on each iteration it solves the normal equation system to compute the next step:

\[|(J^T J + mu I) | = - J^T f\]

which makes it a much more practical method for problems with a large number of residuals \((n >> p)\), since only the p-by-p matrix \(J^T J\) is decomposed rather than the full n-by-p Jacobian. This makes a significant difference in efficiency when solving systems with large amounts of data. While not as robust as lmsder, this algorithm has proven effective on a wide class of problems.

See also gsl_multifit_fdfsolver_lmniel

type = <Swig Object of type 'gsl_multifit_fdfsolver_type *'>
class pygsl.multifit_nlin.lmsder(system, n, p)[source]

Bases: _fdfsolver

scaled Levenberg-Marquardt solver

This is a robust and efficient version of the Levenberg-Marquardt algorithm as implemented in the scaled LMDER routine in MINPACK. Minpack was written by Jorge J. More’, Burton S. Garbow and Kenneth E. Hillstrom.

The algorithm uses a generalized trust region to keep each step under control. In order to be accepted a proposed new position \(x'\) must satisfy the condition \(|D (x' - x)| < \delta\), where D is a diagonal scaling matrix and delta is the size of the trust region. The components of D are computed internally, using the column norms of the Jacobian to estimate the sensitivity of the residual to each component of x. This improves the behavior of the algorithm for badly scaled functions.

On each iteration the algorithm attempts to minimize the linear system \(|F + J p|\) subject to the constraint \(|D p| < \Delta\). The solution to this constrained linear system is found using the Levenberg-Marquardt method.

The proposed step is now tested by evaluating the function at the resulting point, \(x'\). If the step reduces the norm of the function sufficiently, and follows the predicted behavior of the function within the trust region. then it is accepted and size of the trust region is increased. If the proposed step fails to improve the solution, or differs significantly from the expected behavior within the trust region, then the size of the trust region is decreased and another trial step is computed.

The algorithm also monitors the progress of the solution and returns an error if the changes in the solution are smaller than the machine precision. The possible error codes are,

`GSL_ETOLF’

the decrease in the function falls below machine precision

`GSL_ETOLX’

the change in the position vector falls below machine

`GSL_ETOLG’

the norm of the gradient, relative to the norm of the function, falls below machine precision

These error codes indicate that further iterations will be unlikely to change the solution from its current value.

See also gsl_multifit_fdfsolver_lmsder

type = <Swig Object of type 'gsl_multifit_fdfsolver_type *'>
pygsl.multifit_nlin.test_delta(dx, x, epsabs, epsrel)[source]

Test convergence

This function tests for the convergence of the sequence by comparing the last step DX with the absolute error EPSABS and relative error EPSREL to the current position X. The test returns `GSL_SUCCESS’ if the following condition is achieved,

\[|dx_i| < epsabs + epsrel |x_i|\]

for each component of X and returns `GSL_CONTINUE’ otherwise.

pygsl.multifit_nlin.test_gradient(dx, epsabs)[source]

residual gradient test

This function tests the residual gradient G against the absolute error bound EPSABS. Mathematically, the gradient should be exactly zero at the minimum. The test returns `GSL_SUCCESS’ if the following condition is achieved,

\[\sum_i |g_i| < epsabs\]

and returns `GSL_CONTINUE’ otherwise. This criterion is suitable for situations where the precise location of the minimum, x, is unimportant provided a value can be found where the gradient is small enough.

class pygsl.multifit_nlin._fsolver(system, n, p)[source]

Bases: _generic_solver

getdx()[source]
getf()[source]
getx()[source]
position(x)[source]
set(x)[source]
type = None
class pygsl.multifit_nlin._fdfsolver(system, n, p)[source]

Bases: _fsolver

getJ()[source]
type = None

multifit_robust

class pygsl.multifit_robust.stats

::gsl_multifit_robust_stats

Rsq(stats self) double
__eq__(value, /)

Return self==value.

__ge__(value, /)

Return self>=value.

__gt__(value, /)

Return self>value.

__hash__()

Return hash(self).

__init__(*args, **kwargs)
__le__(value, /)

Return self<=value.

__lt__(value, /)

Return self<value.

__ne__(value, /)

Return self!=value.

classmethod __new__(*args, **kwargs)
adj_Rsq(stats self) double
dof(stats self) size_t
numit(stats self) size_t
residuals(stats self) PyObject *
rmse(stats self) double
sigma(stats self) double
sigma_mad(stats self) double
sigma_ols(stats self) double
sigma_rob(stats self) double
sse(stats self) double
weights(stats self) PyObject *
class pygsl.multifit_robust.workspace

::gsl_multifit_robust_workspace

__eq__(value, /)

Return self==value.

__ge__(value, /)

Return self>=value.

__gt__(value, /)

Return self>value.

__hash__()

Return hash(self).

__init__(*args, **kwargs)
__le__(value, /)

Return self<=value.

__lt__(value, /)

Return self<value.

__ne__(value, /)

Return self!=value.

classmethod __new__(*args, **kwargs)
fit(workspace self, gsl_matrix const * X, gsl_vector const * y) PyObject *
Parameters:
  • X (gsl_matrix const *)

  • y (gsl_vector const *)

name(workspace self) char const *
statistics(workspace self) stats
tune(workspace self, double t) gsl_error_flag_drop
Parameters:

t (double)

pygsl.multifit_robust.est(gsl_vector const * v, gsl_vector const * c, gsl_matrix const * cov) gsl_error_flag_drop
Parameters:
  • v (gsl_vector const *)

  • c (gsl_vector const *)

  • cov (gsl_matrix const *)

pygsl.multifit_robust.est_vector(gsl_matrix const * X, gsl_vector const * c, gsl_matrix const * cov) PyObject *
Parameters:
  • X (gsl_matrix const *)

  • c (gsl_vector const *)

  • cov (gsl_matrix const *)

pygsl.multifit_robust.default = <Swig Object of type 'gsl_multifit_robust_type *'>

Swig object carries a C/C++ instance pointer

pygsl.multifit_robust.bisquare = <Swig Object of type 'gsl_multifit_robust_type *'>

Swig object carries a C/C++ instance pointer

pygsl.multifit_robust.cauchy = <Swig Object of type 'gsl_multifit_robust_type *'>

Swig object carries a C/C++ instance pointer

pygsl.multifit_robust.fair = <Swig Object of type 'gsl_multifit_robust_type *'>

Swig object carries a C/C++ instance pointer

pygsl.multifit_robust.huber = <Swig Object of type 'gsl_multifit_robust_type *'>

Swig object carries a C/C++ instance pointer

pygsl.multifit_robust.ols = <Swig Object of type 'gsl_multifit_robust_type *'>

Swig object carries a C/C++ instance pointer

pygsl.multifit_robust.welsch = <Swig Object of type 'gsl_multifit_robust_type *'>

Swig object carries a C/C++ instance pointer

bspline

ieee

ieee interface

Wrappers for the functionality provided by IEEE floating-point arithmetic

pygsl.ieee.bin_repr()
pygsl.ieee.env_setup()
Set the IEEE mode, the GSL library should use, using the GSL_IEEE_MODE

environement variable

You can also use os.environ[‘GSL_IEEE_MODE’]=’<desired_behaviour>’ to set the variable

Calls gsl_ieee_env_setup()

pygsl.ieee.finite(object, /)

Returns if the number is finite.

Wrapper for gsl_finite()

Parameters:

o – python object

Returns:

if finite or not

Return type:

bool

pygsl.ieee.isinf(object, /)

Returns if the object is inif

Wrapper for gsl_isinf()

Parameters:

o – python object

Return type:

bool

pygsl.ieee.isnan(object, /)

Returns if the object is Nan

Wrapper for gsl_isnan()

Parameters:

o – python object

Returns:

if Nan or not

Return type:

bool

pygsl.ieee.nan()

Returns not a number

pygsl.ieee.neginf()

Returns a negative infinite: Inf

pygsl.ieee.posinf()

Returns a positive infinite: -Inf

pygsl.ieee.set_mode()
pygsl.ieee.set_mode(precision, rounding, exception_mask)

Sets the ieee float handling mode

Parameters:
Each flag can be a combination of the constants defined in this module

Raises gsl_NoHardwareSupportError if support is not available.

Warning

Use with care! It can abort your programm abnormaly!

pygsl.ieee.single_precision = 1

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.ieee.double_precision = 2

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.ieee.extended_precision = 3

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.ieee.mask_all = 31

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.ieee.mask_denormalized = 2

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.ieee.mask_division_by_zero = 4

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.ieee.mask_invalid = 1

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.ieee.mask_overflow = 8

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.ieee.mask_underflow = 16

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.ieee.round_to_nearest = 1

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.ieee.round_down = 2

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.ieee.round_up = 3

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.ieee.round_to_zero = 4

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.ieee.trap_inexact = 32

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.ieee.type_nan = 1

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.ieee.type_inf = 2

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.ieee.type_normal = 3

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.ieee.type_denormal = 4

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

pygsl.ieee.type_zero = 5

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

Modules not considered part of the API

Obsoletes

diff

odeiv

Wrapper for the ode solver of gsl. This solver wraps all features as descirbed in Chapter 25 of the gsl documentation.

The _odeiv file provides the low level wrapper. Direct usage at your special own risk.

Here is the pythonic version of the example from the gsl documentation.

import odeiv mu = 10.0 def func(t, y):

f = Numeric.zeros((2,), Numeric.Float) * 1.0 f[0] = y[1] f[1] = -y[0] - mu * y[1] * (y[0] ** 2 -1); return f

def jac(t, y):

dfdy = Numeric.zeros((2,2), Numeric.Float) dfdy[0, 0] = 0.0 dfdy[0, 1] = 1.0 dfdy[1, 0] = -2.0 * mu * y[0] * y[1] - 1.0 dfdy[1, 1] = -mu * (y[0]**2 - 1.0) dfdt = Numeric.zeros((2,)) return dfdy, dfdt

dimension = 2 step = odeiv.step_gear1(dimension, func, jac) control = odeiv.control_y_new(step, 1e-6, 1e-6) evolve = odeiv.evolve(step, control, dimension) h = 1 t = 0.0 t1 = 100.0 y = (1.0, 0.0) while t<t1:

t, h, y = evolve.apply(t, t1, h, y) print t, y[0], y[1]

class pygsl.odeiv.control_standard_new(step, eps_abs, eps_rel, a_y, a_dydt)[source]

Bases: __control

The standard control object is a four parameter heuristic based on absolute and relative errors eps_abs and eps_rel, and scaling factors a_y and a_dydt for the system state y(t) and derivatives y’(t) respectively.

The step-size adjustment procedure for this method begins by computing the desired error level D_i for each component,

D_i = eps_abs + eps_rel * (a_y |y_i| + a_dydt h |y'_i|)

and comparing it with the observed error E_i = |yerr_i|. If the observed error E exceeds the desired error level D by more than 10% for any component then the method reduces the step-size by an appropriate factor,

h_new = h_old * S * (D/E)^(1/q)

where q is the consistency order of method (e.g. q=4 for 4(5) embedded RK), and S is a safety factor of 0.9. The ratio D/E is taken to be the maximum of the ratios D_i/E_i.

If the observed error E is less than 50% of the desired error level D for the maximum ratio D_i/E_i then the algorithm takes the opportunity to increase the step-size to bring the error in line with the desired level,

h_new = h_old * S * (E/D)^(1/(q+1))

This encompasses all the standard error scaling methods.

class pygsl.odeiv.control_y_new(step, eps_abs, eps_rel)[source]

Bases: __control

Creates a new control object which will keep the local error on each step within an absolute error of eps_abs and relative error of eps_rel with respect to the solution y_i(t). This is equivalent to the standard control object with a_y=1 and a_dydt=0.

See also the documentation of the control_standard_new class

class pygsl.odeiv.control_yp_new(step, eps_abs, eps_rel)[source]

Bases: __control

This function creates a new control object which will keep the local error on each step within an absolute error of eps_abs and relative error of eps_rel with respect to the derivatives of the solution y’_i(t) . This is equivalent to the standard control object with a_y=0 and a_dydt=1.

class pygsl.odeiv.evolve(step, control, dimension)[source]

Bases: object

The highest level of the system is the evolution function which combines the results of a stepping function and control function to reliably advance the solution forward over an interval (t_0, t_1). If the control function signals that the step-size should be decreased the evolution function backs out of the current step and tries the proposed smaller step-size. This is process is continued until an acceptable step-size is found.

apply(t, t1, h, y)[source]
inputt, t1, h, y

t … start time t1 … end time h … initial step size y … start vector

output :

t … reached time in the calculation h … reached step size y … end vector

This method advances the system from time t and position y using the stepping function step. The new time and position are stored in t and y on output. The initial step-size is taken as h, but this will be modified to achieve the appropriate error bound if necessary. The routine may make several calls to the step object in order to determine the optimum step-size. If the step-size has been changed the value of h will be modified on output. The maximum time t1 is guaranteed not to be exceeded by the time-step. On the final time-step the value of t will be set to t1 exactly.

apply_vector(t, t1, h, y, nsteps=1, hmax=None)[source]
reset()[source]

No input. No output

This method resets the evolution. It should be used whenever the next use will not be a continuation of a previous step.

class pygsl.odeiv.step_bsimp(dims, func, jac=None, args=None)[source]

Bases: __step

Implicit Bulirsch-Stoer method of Bader and Deuflhard. This algorithm requires the Jacobian.

need_jacobian = 1
type = <Swig Object of type 'gsl_odeiv_step_type *'>
class pygsl.odeiv.step_gear1(dims, func, jac=None, args=None)[source]

Bases: __step

M=1 implicit Gear method

need_jacobian = 0
type = <Swig Object of type 'gsl_odeiv_step_type *'>
class pygsl.odeiv.step_gear2(dims, func, jac=None, args=None)[source]

Bases: __step

M=2 implicit Gear method

need_jacobian = 0
type = <Swig Object of type 'gsl_odeiv_step_type *'>
class pygsl.odeiv.step_rk2(dims, func, jac=None, args=None)[source]

Bases: __step

Embedded 2nd order Runge-Kutta with 3rd order error estimate.

need_jacobian = 0
type = <Swig Object of type 'gsl_odeiv_step_type *'>
class pygsl.odeiv.step_rk2imp(dims, func, jac=None, args=None)[source]

Bases: __step

Implicit 2nd order Runge-Kutta at Gaussian points

need_jacobian = 0
type = <Swig Object of type 'gsl_odeiv_step_type *'>
class pygsl.odeiv.step_rk4(dims, func, jac=None, args=None)[source]

Bases: __step

4th order (classical) Runge-Kutta.

need_jacobian = 0
type = <Swig Object of type 'gsl_odeiv_step_type *'>
class pygsl.odeiv.step_rk4imp(dims, func, jac=None, args=None)[source]

Bases: __step

Implicit 4th order Runge-Kutta at Gaussian points

need_jacobian = 0
type = <Swig Object of type 'gsl_odeiv_step_type *'>
class pygsl.odeiv.step_rk8pd(dims, func, jac=None, args=None)[source]

Bases: __step

Embedded 8th order Runge-Kutta Prince-Dormand method with 9th order error estimate.

need_jacobian = 0
type = <Swig Object of type 'gsl_odeiv_step_type *'>
class pygsl.odeiv.step_rkck(dims, func, jac=None, args=None)[source]

Bases: __step

Embedded 4th order Runge-Kutta Cash-Karp method with 5th order error estimate.

need_jacobian = 0
type = <Swig Object of type 'gsl_odeiv_step_type *'>
class pygsl.odeiv.step_rkf45(dims, func, jac=None, args=None)[source]

Bases: __step

Embedded 4th order Runge-Kutta-Fehlberg method with 5th order error estimate. This method is a good general-purpose integrator.

need_jacobian = 0
type = <Swig Object of type 'gsl_odeiv_step_type *'>

sf

Not documented here. Name clashes with pygsl.testing.sf could occur.

math

Simple Mathematical functions

fcmp(a, b, epsilon) -> -1, 0, 1

Modules containing wrappers

These wrappers are used by APIs. Typically these are not directly accessed by the user.

init

pygsl.init module

This module is a collection of internal conversion function. These functions typically need not be accessed by the pygsl user. All functionality is wrapped by appropriate functions and exported to the user at a higher level

Warning

Please note the functions given here change the total behaviour of pygsl. If wrongly used it could even crash the program.

pygsl.init.add_c_traceback_frames()

GSL solvers make callbacks to registered python functions at moments often not expected. Therefore traceback frames were added which are automatically inserted by the C Code These traceback frames, however, create a memory leak in the current implementation. So these are disabled by default and can be enabled by setting a true value with this function. Setting to 0/False will disable it again

pygsl.init.complex_transform_counter()

Number of transforms required by complex objects

How many times objects which were passed as complex arguments had to be transformed to appropriate python object?

Parameters:

None

Returns:

number of convertions executed

Return type:

long

pygsl.init.error_handler_state_get()

Get the stored error state

User access best using: pygsl.errors.error_safe_state

pygsl.init.error_handler_state_reset()

Reset the stored error state

User access best using: pygsl.errors.error_safe_state

pygsl.init.float_transform_counter()

Number of transforms required by float objects

How many times objects which were passed as float arguments had to be transformed to appropriate object? (e.g. an integer had to be converted to a float)

Parameters:

None

Returns:

number of convertions executed

Return type:

long

pygsl.init.get_debug_level()

Get the internal debug level

see pygsl.set_debug_level() for details

pygsl.init.matrix_transform_counter()

Number of transforms required by matrix objects

How many times objects which were passed as matrix arguments had to be transformed to appropriate numpy array?

Parameters:

None

Returns:

number of convertions executed

Return type:

long

pygsl.init.register_exceptions()

Used to register all exceptions

Warning

Internal function! Do not use it if not familar!

pygsl.init.register_warnings()

Used to register all exceptions

Warning

Internal function! Do not use it if not familar!

pygsl.init.set_debug_level()

Set the internal debug level

see pygsl.set_debug_level() for details

pygsl.init.vector_transform_counter()

Number of transforms required by vector objects

How many times objects which were passed as vector arguments had to be transformed to appropriate numpy array?

Parameters:

None

Returns:

number of convertions executed

Return type:

long

gsl_function

Collection of Callbacks systems for pygsl. They follow the GSL definitions as close as possible. Instead os a struct python classes are used.

All solvers accept a C void pointer, which is passed to the callback. In Pygsl this is an abitrary python object. See the doc strings of the various classes for further detail.

class pygsl.gsl_function.gsl_function(func, args)[source]

Bases: _gsl_function

This class defines the callbacks known as gsl_function to gsl.

e.g to supply the function f:

def f(x, params):

a = params[0] b = parmas[1] c = params[3] return a * x ** 2 + b * x + c

to some solver, use

function = gsl_function(f, params)

freefunc()
initfunc()
class pygsl.gsl_function.gsl_function_fdf(func, deriv, fdf, args)[source]

Bases: _gsl_function_fdf

This class defines the callbacks known as gsl_function_fdf to gsl.

e.g to supply the function f:

def f(x, None):

return exp(2 * x)

def df(x, None):

return 2 * exp(2 * x)

def fdf(x, None):

myf = f(x, None) mydf = df(x, None) return myf, mydf

to some solver, accepting gsl_function_fdf, use

function = gsl_function_fdf(f, df, fdf, params)

freefunc()
initfunc()
class pygsl.gsl_function.gsl_monte_function(func, args, size)[source]

Bases: gsl_multiroot_function

This class defines the callbacks for gsl_monte_function.

freefunc()
initfunc()
class pygsl.gsl_function.gsl_multifit_function(f, args, n, p)[source]

Bases: _gsl_function

This class defines the callbacks for gsl_multimin_function.

To fit a exponential function to data write the following function:

def exp_f(x, params):

A = x[0] lambda_ = x[1] b = x[2] t= params[0] yi = params[1] sigma = params[2] Yi = A * exp(-lambda_ * t) + b f = yi - Yi / sigma return f

# Number of data samples n = len(data) # Number of paramters p = 3 multifit_nlin.gsl_multifit_function(exp_f, data, n, p)

freefunc()
initfunc()
class pygsl.gsl_function.gsl_multifit_function_fdf(f, df, fdf, args, n, p)[source]

Bases: _gsl_function_fdf

This class defines the callbacks for gsl_multimin_function. def exp_f(x, params):

A = x[0] lambda_ = x[1] b = x[2] t= params[0] yi = params[1] sigma = params[2] Yi = A * exp(-lambda_ * t) + b f = yi - Yi / sigma return f

def exp_df(x, params):

A = x[0] lambda_ = x[1] b = x[2] t= params[0] yi = params[1] sigma = params[2] e = exp(-lambda_ * t) e_s = e/sigma df = Numeric.array((e_s, -t * A * e_s, 1/sigma)) df = Numeric.transpose(df) print df.shape return df

def exp_fdf(x, params):

f = exp_f(x, params) df = exp_df(x, params) return f, df

# Number of data samples n = len(data) # Number of paramters p = 3 multifit_nlin.gsl_multifit_function_fdf(exp_f, exp_df, exp_fdf, data, n, p)

freefunc()
initfunc()
class pygsl.gsl_function.gsl_multimin_function(func, args, size)[source]

Bases: gsl_multiroot_function

This class defines the callbacks for gsl_multimin_function.

The following example function defines a simple paraboloid with two parameters.

To supply the system define the function: def my_f(v, params):

x = v[0] y = v[1]

dp = params t1 = (x - dp[0]) t2 = (y - dp[1]) f = 10.0 * t1 * t1 + 20.0 * t2 * t2 + 30.0 return f

# dimension of x size = 2

sys = multimin.gsl_multifit_function(my_f, params, 2)

freefunc()
initfunc()
class pygsl.gsl_function.gsl_multimin_function_fdf(f, df, fdf, args, size)[source]

Bases: gsl_multiroot_function_fdf

This class defines the callbacks for gsl_multimin_function_fdf.

The following example function defines a simple paraboloid with two parameters.

To supply the system define the function: def my_f(v, params):

x = v[0] y = v[1]

dp = params t1 = (x - dp[0]) t2 = (y - dp[1]) f = 10.0 * t1 * t1 + 20.0 * t2 * t2 + 30.0 return f

def my_df(v, params):

x = v[0] y = v[1] df = Numeric.zeros(v.shape, Numeric.Float) dp = params df[0] = 20. * (x - dp[0]) df[1] = 40. * (y - dp[1]) return df

def my_fdf(v, params):

f = my_f(v, params) df = my_df(v,params) return f, df

# dimension of x size = 2 sys = multimin.gsl_multifit_function(my_f, my_df, my_fdf, params, size)

freefunc()
initfunc()
class pygsl.gsl_function.gsl_multiroot_function(func, args, size)[source]

Bases: _gsl_function

This class defines the callbacks for gsl_multiroot_function.

To supply the function rosenbrock define the function:

def rosenbrock_f(x, params):

a = params[0] b = params[1] y = copy.copy(x) y[0] = a * (1 - x[0]) y[1] = b * (x[1] - x[0] * x[0]) return y

sys = multiroots.gsl_multiroot_function(rosenbrock_f, params, 2)

freefunc()
initfunc()
class pygsl.gsl_function.gsl_multiroot_function_fdf(f, df, fdf, args, size)[source]

Bases: _gsl_function_fdf

This class defines the callbacks for gsl_multiroot_function.

To supply the function rosenbrock define the functions:

def rosenbrock_f(x, params):

a = params[0] b = params[1] y = copy.copy(x) y[0] = a * (1 - x[0]) y[1] = b * (x[1] - x[0] * x[0]) return y

def rosenbrock_df(x, params):

a = params[0] b = params[1] df = Numeric.zeros((x.shape[0], x.shape[0]), Numeric.Float) df[0,0] = -a df[0,1] = 0 df[1,0] = -2 * b * x[0] df[1,1] = b return df

def rosenbrock_fdf(x, params):

f = rosenbrock_f(x, params) df = rosenbrock_df(x, params) return f, df

# dimension of x size = 2 sys = multiroots.gsl_multiroot_function(rosenbrock_f, rosenbrock_df,

rosenbrock_fdf, params, size)

freefunc()
initfunc()

gslwrap

interpolation2d_wrap

Modules for testing internals

Submodules

init

pygsl.init module

This module is a collection of internal conversion function. These functions typically need not be accessed by the pygsl user. All functionality is wrapped by appropriate functions and exported to the user at a higher level

Warning

Please note the functions given here change the total behaviour of pygsl. If wrongly used it could even crash the program.

pygsl.init.add_c_traceback_frames()

GSL solvers make callbacks to registered python functions at moments often not expected. Therefore traceback frames were added which are automatically inserted by the C Code These traceback frames, however, create a memory leak in the current implementation. So these are disabled by default and can be enabled by setting a true value with this function. Setting to 0/False will disable it again

pygsl.init.complex_transform_counter()

Number of transforms required by complex objects

How many times objects which were passed as complex arguments had to be transformed to appropriate python object?

Parameters:

None

Returns:

number of convertions executed

Return type:

long

pygsl.init.error_handler_state_get()

Get the stored error state

User access best using: pygsl.errors.error_safe_state

pygsl.init.error_handler_state_reset()

Reset the stored error state

User access best using: pygsl.errors.error_safe_state

pygsl.init.float_transform_counter()

Number of transforms required by float objects

How many times objects which were passed as float arguments had to be transformed to appropriate object? (e.g. an integer had to be converted to a float)

Parameters:

None

Returns:

number of convertions executed

Return type:

long

pygsl.init.get_debug_level()

Get the internal debug level

see pygsl.set_debug_level() for details

pygsl.init.matrix_transform_counter()

Number of transforms required by matrix objects

How many times objects which were passed as matrix arguments had to be transformed to appropriate numpy array?

Parameters:

None

Returns:

number of convertions executed

Return type:

long

pygsl.init.register_exceptions()

Used to register all exceptions

Warning

Internal function! Do not use it if not familar!

pygsl.init.register_warnings()

Used to register all exceptions

Warning

Internal function! Do not use it if not familar!

pygsl.init.set_debug_level()

Set the internal debug level

see pygsl.set_debug_level() for details

pygsl.init.vector_transform_counter()

Number of transforms required by vector objects

How many times objects which were passed as vector arguments had to be transformed to appropriate numpy array?

Parameters:

None

Returns:

number of convertions executed

Return type:

long

inittest

Functions needed to test the pygsl.init

pygsl.inittest.complex_conversion()

convert python complex to gsl complex and back to python complex

pygsl.inittest.new_array()

create a vector or a matrix. Requires first dimension plus optional a second dimension

pygsl.inittest.test_getptr1()

Prints the offset calculated for the different cols for a matrix using stride or GetPtr1

pygsl.inittest.vector_or_double()

Pass a vector or a double in. It will return a Python Array Object

pygsl.inittest.vector_refcount()

Accepts a vector and returns the refcount to the object

errortest

Functions needed to test the error handling provided by pygsl.init and the gsl error handler gsl_error().

block

vector

Vector module.

This module provides mappings to some functions of gsl vectors as descirebed in Chapter 8.3 of the gsl reference document. All functions accept one dimensional Numeric arrays instead of gsl vectors, or return Numeric arrays.

Warning

When translating alghorithms from C to Python, check if the

functions do the same. Inplace change does not need to have effect here, some of these functions make copies internally.

All functions from Section 8.3.3 take an integer as input and return an approbriate Numeric array as output. The prefix gsl_vector has been discarded. These functions are:

  • set_zero

  • set_all

  • set_basis

Functions to read write the vector from a file are provided as well:
  • fprintf

  • fscanf

  • fread

  • fwrite

Some basic data operations are provided as well (See Section 8.3.7):
  • reverse

  • swap

  • swap_elements

And some functions from Section 8.3.9
  • max

  • min

  • minmax

  • isnull

  • max_index

  • min_index

  • minmax_index

matrix_pierre

The matrix module.

This module provides mappings to some functions of gsl vectors as descirbed in Chapter 8. of the gsl reference document. All functions accept one dimensional Numeric arrays instead of gsl vectors, or return Numeric arrays.

Warning

When translating alghorithms from C to Python, check if the functions do the same. Inplace change does not need to have effect here, some of these functions make copies internally.

All functions from Section 8. take an integer as input and return an approbriate Numeric array as output. The prefix gsl_matrix has been discarded. These functions are:

  • set_zero

  • set_all

  • set_identity

Functions to read write the matrix from a file are provided as well:
  • fprintf

  • fscanf

  • fread

  • fwrite

Some basic data operations are provided as well (See Section 8.):
  • diagonal

  • subdiagonal

  • superdiagonal

  • swap

  • swap_columns

  • swap_rowcol

  • swap_rows

  • transpose

And some functions from Section 8.
  • max

  • min

  • minmax

  • isnull

  • max_index

  • min_index

  • minmax_index