Skip to content

implement allclose or something similar #871

Closed
@gdementen

Description

@gdementen

It is simply annoying to have to type:

arr1.equals(arr2, atol=1e-08, nans_equal=True)

PS: I am thorn about whether nans_equals should default to True or False in that case. On one hand, in 99.9% cases, I want nans_equal=True, so it would be nice to have a method with such a default to avoid having to type it each time (or worse... usually forgetting to type it then notice my result is False... investigate why... and only notice that it was because it had nans and I forgot to specify the arg). On the other hand having a different default than in equals could be confusing and having it default to True could lead, in some very rare case, to nan results being unnoticed, i.e. a silent error, which is what a library (and larray even more so) should strive to avoid.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions