The equality comparisons here and here throw the following error when any values are Numpy arrays:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
For example, this occurs when the new and current schemas are {'_divider': {'divider': 'set_value', 'config': {'value': np.zeros(10)}}}. The above Exception is raised due to the np.zeros(10) buried deep within the _divider schema. A custom recursive function is needed to check all schema values for embedded Numpy arrays and compare them separately using np.array_equal.
The equality comparisons here and here throw the following error when any values are Numpy arrays:
For example, this occurs when the new and current schemas are
{'_divider': {'divider': 'set_value', 'config': {'value': np.zeros(10)}}}
. The above Exception is raised due to thenp.zeros(10)
buried deep within the_divider
schema. A custom recursive function is needed to check all schema values for embedded Numpy arrays and compare them separately usingnp.array_equal
.