Skip to content

Tolerance argument for da.isin()?Β #5587

Open
@TomNicholas

Description

Is your feature request related to a problem? Please describe.
Sometimes you want to check that data values are present in another array, but only up to a certain tolerance.

Describe the solution you'd like
da.isin(test_values, tolerance=1e-6), where the tolerance argument is optional.

Not sure what the implementation should be but there are two vectorized suggestions here.

Describe alternatives you've considered
Different to np.isclose because isin compares all values against a flattened array, whereas isclose compares individual values elementwise.

Additional context
@jbusecke requested it.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions