11.1 Organization of the module

Individual parts of the GSL functions names, providing artificial namespaces in C, are mapped to modules and submodules in PyGSL. That is, gsl_stats_mean can be found as pygsl.statistics.mean and gsl_stats_long_mean as pygsl.statistics.long.mean.

The functions in the module are available in versions for datasets in the standard and NumPy floating-point and integer types. The generic versions available in the pygsl.statistics module are using the generic GSL double versions. The submodules use GSL functions according to the submodule name, e.g. long for pygsl.statistics.long.

Implemented submodules are char, uchar, short, int, long, float, and double. The latter one also serves as default and is used whenever you don't expclicitely state a different datatype. In most cases it is appropriate to simply use the default implementation as it covers the widest range of the real space, offers high precision, and as such is simple to use. If you have a sequence of all integer values it is straightforward to use pygsl.statistics.long functions as these use an implementation corresponding to Pythons Float-type. These implemented submodules represent all numeric datatypes available in Python (Int, Float) besides Long Int which has no representation in standard C, as well as all numeric datatypes available in NumPy that have corresponding implementations in GSL (on 32 bit systems these are: Character, UnsigendInt8, Int16, Int32, Int, Float32, Float).