Skip to content

generic interface to np.testing assertions #232

Description

@lucascolley

Hey @wilsonrljr, just to let you know, we've been working on exposing a generic interface to functions like np.testing.assert_allclose in array-api-extra under the xpx.testing namespace. This should eliminate the need to call _to_numpy in places like this:

assert_array_equal(_to_numpy(result), np.array([[2.0], [4.0], [6.0]]))

and give you extra checks 'for free' on top of np.testing, e.g. that the namespaces of the input arrays match.

We're currently checking that what we have works for SciPy and scikit-learn in scipy/scipy#25143 and scikit-learn/scikit-learn#34019. Once we're happy with that, we'll expose the public API. Would be great to have you as an early adopter, in case there are any rough edges that need smoothing out!

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