lib.utils

Global utilities.

Functions

blockinv

Return inverse of input blocks matrix.

cov_to_corrcoef

Return correlation matrix corresponding to input covariance matrix cov.

customspace

Return regularly-spaced array.

dict_nonedefault

Set d1 dictionary entries to those in d2 if do not exist or None.

enforce_shape

Broadcast x and y arrays.

interleave

Interleave input arrays a, i.e. return array with, in order: First elements of all arrays (with size > 0), then second elements of all arrays with size > 1, etc.

inv

Return inverse of input 2D or 0D (scalar) array mat.

match1d

Match id2 array to id1 array.

rebin_ndarray

Bin an ndarray in all axes based on the target shape, by summing or averaging.

round_measurement

Return string representation of input central value x with uncertainties u and v.

sci_notation

Scientific notation.

std_notation

Standard notation (US version).

txt_to_latex

Transform standard text into latex by replacing ‘_xxx’ with ‘_{xxx}’ and ‘^xxx’ with ‘^{xxx}’.

weighted_quantile

Compute the q-th quantile of the weighted data along the specified axis.

Classes

BaseClass

BaseNameSpace

Class holding a bunch of attributes.

BaseOrderedCollection

Class holding an ordered, unique list of items.

ScatteredBaseClass