Skip to content

Consider the auto-patching of numpy on import #158

@fzimmermann89

Description

@fzimmermann89

Hi,

I realy like the concept behind pnumpy, but might prefer if an import of pnumpy would not automagically monkey patch numpy, but only provide pnumpy.* entry points to parallel versions and only after a call to some init() function it would actually patch in all functionality.

This way it would be much easier to use it on packages without breaking downstream user's code which relies on numpy functions actually being numpy.

https://numpy.org/neps/nep-0036-fair-play.html argues for this approach as well I think, and this is the approach that intel takes with its mkl_umath library.

This would for example allow users to mix mkl_umath and pnumpy more easily.

Please let me know what the reasoning for switching to overwriting the numpy functions on import were, and if you might reconsider this decision

Have a great day
Felix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions