grogupy._core.arrays_lists_equal
- grogupy._core.arrays_lists_equal(array1: Any, array2: Any) bool[source]
Compares two objects with specific rules.
if the objects are not arrays or nested lists ending in arrays, then it returns False. Otherwise it goes down the list structure and checks all the arrays with np.allclose for equality. If the structure itself or any array is different, then it returns False. Otherwise it returns True. It is useful to check the Greens function results and the perturbations.
Parameters
- array1: Any
The first object to compare
- array2: Any
The second object to compare
Returns
- bool:
Wether the above described structures are equal