perfplot icon indicating copy to clipboard operation
perfplot copied to clipboard

[BUG] Equality check does not support integers

Open muendlein opened this issue 2 years ago • 0 comments

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)

muendlein avatar Jan 22 '23 18:01 muendlein