perfplot
perfplot copied to clipboard
[BUG] Equality check does not support integers
The existing equality check does not support integers as np.allclose will throw an exception:
xfin = isfinite(x)
TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
def default_equality_check(a, b):
if isinstance(a, str):
return a == b
return np.allclose(a, b)