darkhistory.utilitiesΒΆ
Non-physics convenience and mathematical functions.
Functions
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. |
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)\). |
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. |
