pg_utils.numerics.utils

Miscellaneous utilities for numerical calculation

Functions

allclose_sparse(array_1, array_2[, rtol, atol])

Compare if two sparse matrices are close enough

array_to_str(x[, str_fun])

Convert array to List of strings

cluster_modes(eig_vals[, rtol, atol])

Clustering of eigenvalues.

eigen_drift(eig_base, eig_comp[, waterlevel])

Calculate eigenvalue drift ratio using Boyd's method ([Boyd])

eigenfreq_Malkus_3d(m, n, Le[, mode, timescale])

Analytic eigenfrequency for 3D eigemodes with Malkus bg field

eigenfreq_Malkus_pg(m, n, Le[, mode, ...])

Analytic eigenfrequency for the PG model with Malkus bg field

eigenfreq_inertial3d(m, n)

Analytic eigenfrequency for the 3D inertial modes

eigenfreq_psi_op(m, n[, prec])

Analytic eigenfrequency for the self-adjoint operator for stream function Psi in the vorticity equation

intermodal_separation(eig_vals, **opt_cluster)

Calculate intermodal separation ([Boyd])

is_eq_coo(array_1, array_2)

Compare if two COORdinate format sparse arrays are identical

is_eq_sparse(array_1, array_2)

Compare if two sparse matrices are identical

spec_tail_exp_rate(spectrum)

Calculate maximum exponential rate of convergence from the trailing part of a spectrum.

to_dense_gmpy2(gmpy2_array, prec[, mode])

Convert a sparse gmpy2 array to dense form

to_dense_obj(obj_array, fill_zero)

Convert a sparse object array to dense form

to_gpmy2_c(x[, dps, prec])

Convert float array to gmpy2 float array

to_gpmy2_f(x[, dps, prec])

Convert float array to gmpy2 float array

to_mpmath_c(x[, dps, prec])

Convert float array to mpmath float array

to_mpmath_f(x[, dps, prec])

Convert float array to mpmath float array

to_numpy_c(x)

Convert complex array to numpy complex128 array

to_numpy_f(x)

Convert float array to numpy float64 array

transform_dps_prec([dps, prec, dps_default, ...])

Conversion between decimal points and precision