Skip to content

[BUG] Equality check does not support integers #164

Description

@muendlein

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions