Skip to content

PyTorch NumPy 2.x Compatibility Issue #4

@zgrkrky

Description

@zgrkrky

When using PyTorch 2.2.2 with NumPy 2.2.3, I encounter the following warning:

vbnet
A module that was compiled using NumPy 1.x cannot be run in NumPy 2.2.3 as it may crash...
UserWarning: Failed to initialize NumPy: _ARRAY_API not found...
While PyTorch still loads, this suggests an incompatibility with NumPy 2.x. Downgrading NumPy is not an ideal solution since other dependencies require NumPy 2.x.

Expected Behavior:
PyTorch should support NumPy 2.x or provide an official statement regarding compatibility.

Environment:

OS: macOS
Python: 3.10.16
PyTorch: 2.2.2
NumPy: 2.2.3
Installation: pip

Provide a PyTorch build compiled with NumPy 2.0+
Officially support NumPy 2.x or document the limitation

Looking forward to a resolution. Thanks! 🚀

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions