numpy@2
3 traces
- NumPy 2: np.array(x, copy=False) now raises ValueError if a copy is needed — use np.asarrayCode written for NumPy 1.x as np.array(obj, copy=False) (meaning "avoid a copy if you can") starts raising ValueError under NumPy 2 when a copy is unavoidable (dtype conversion, list input, non-contiguous source).
- A module that was compiled using NumPy 1.x cannot be run in NumPy 2.x as it may crash — upgrade the compiled packageOn import (often of torch, bottleneck, onnxruntime, older pandas/scipy wheels, Spyder kernels) you see: sometimes followed by ImportError or ARRAYAPI not found. Fix: Read the traceback to find the compiled package…
- AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.Importing a library (prophet, chromadb, older nflverse/weave versions) or running your own code under NumPy 2.x raises: Same family: np.NaN, np.Inf, np.complex, np.unicode, np.string, np.cast, np.product,…