Skip to content

Extend __numpy_ufunc__ to most numpy.core.multiarray functions? #4164

@pv

Description

@pv

The __numpy_ufunc__ mechanism likely is easily extended to all relevant numpy.core.multiarray functions. This would also enable several pure-Python Numpy functions (e.g. hstack, vstack, ...) to work transparently with 3rd party classes --- as long as array/asarray are not called, things should work out transparently.

It might also make sense to add a helper function to multiarraymodule so that the override mechanism can be invoked from Python side. This could be a sensible alternative e.g. in the case of linear algebra functions.

Metadata

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