Skip to content

[BUG] Equality check does not support integers #164

@muendlein

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)

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