SciPy

darkhistory.utilities

Non-physics convenience and mathematical functions.

Functions

arrays_close(ndarray_list[, rtol, atol])

Checks if a list of arrays are all np.allclose.

arrays_equal(ndarray_list)

Checks if a list of arrays are all equal.

bernoulli(k)

The kth Bernoulli number.

check_err(val, err, epsrel)

Checks the relative error given a tolerance.

compare_arr(ndarray_list)

Prints the arrays in a suitable format for comparison.

dict_from_inhom_list(l, key)

Get hdf5 compatible dictionary from an inhomogeneous list of arrays.

exp_expn(n, x)

Returns \(e^x E_n(x)\).

get_grid(a, b)

Returns a 2D grid of coordinates from 2 1D arrays.

hyp2f1_func_real(n, x)

Returns the real part of \(_2F_1(1, n+1, n+2, x)\).

inhom_list_from_dict(d, key)

Get inhomogeneous list of arrays from dictionary.

is_log_spaced(arr)

Checks for a log-spaced array.

log_1_plus_x(x)

Computes log(1+x) with greater floating point accuracy.

log_series_diff(b, a)

The Taylor series for log(1+b) - log(1+a).

spence_series_diff(b, a)

Returns the Taylor series for Li2(b) - Li2(a).

Classes

Interpolator2D(arr0, name0, arr1, name1, val_arr)

Interpolation function over a list of objects.

This Page