psi4.driver.compare_arrays(expected, computed, digits, label, rtol=1e-16)[source]

Function to compare two numpy arrays. Prints util.success() when elements of vector computed match elements of vector expected to number of digits. Performs a system exit on failure to match symmetry structure, dimension, or element values. Used in input files in the test suite.

Sets rtol to zero to match expected Psi4 behaviour, otherwise measured as:
absolute(computed - expected) <= (atol + rtol * absolute(expected))