NumPy
Data & MLThe fundamental package for scientific computing with Python.
Release History
v2.4.43 fixesNumPy 2.4.4 is a patch release that resolves bugs, most notably fixing the OpenBLAS threading issue on ARM architectures.
v2.4.38 fixesNumPy 2.4.3 is a patch release primarily focused on bug fixes, including a significant threading fix for OpenBLAS on ARM.
v2.4.26 fixes1 featureNumPy 2.4.2 is a patch release focused on bug fixes, including resolving memory leaks and updating OpenBLAS to prevent hangs. It also adds minor feature enhancements like datetime string acceptance in arange.
v2.4.1v2.4.0Breaking4 featuresNumPy 2.4.0 introduces improvements for free threaded Python support, user dtypes, and annotations, alongside removing many long-deprecated APIs and finalizing prior deprecations.
v2.4.0rc1Breaking4 featuresNumPy 2.4.0 introduces annotation improvements, a new 'same_value' casting option, and several new APIs for user dtypes. This release also removes numerous long-deprecated features and enforces stricter behavior for scalar conversion.
v2.3.57 fixes1 featureNumPy 2.3.5 is a patch release containing maintenance updates and numerous bug fixes, including improvements to string slicing and handling of INT_MIN negation.
v2.3.410 fixesNumPy 2.3.4 is a patch release containing maintenance updates and numerous bug fixes, including changes to static library extensions on win-arm64 for MSVC compatibility.
v2.3.37 fixes2 featuresNumPy 2.3.3 is a patch release focused on maintenance updates and bug fixes across various areas, including linear algebra, type casting, and build system improvements. It introduces a new `sorted` argument for `np.unique`.
v2.3.29 fixes1 featureNumPy 2.3.2 is a patch release containing numerous bug fixes and maintenance updates, including support for Python 3.14.0rc1 wheels and updates to underlying libraries like PyPy and OpenBLAS.
v2.3.17 fixes1 featureNumPy 2.3.1 is a patch release containing several bug fixes, annotation improvements, and enhanced CPU feature detection support for OpenBSD and FreeBSD.
v2.3.06 featuresNumPy 2.3.0 introduces new features like string slicing and OpenMP support, alongside numerous expired deprecations being removed. This release focuses on improving free threaded Python support and code modernization.
v2.3.0rc16 featuresNumPy 2.3.0 improves free threaded Python support and annotations, introduces the new numpy.strings.slice function, and removes numerous long-expired deprecations. This release also modernizes code style and upgrades binary compatibility tags to manylinux_2_28.
v2.2.64 fixesNumPy 2.2.6 is a patch release focusing on bug fixes, particularly around string operations and type handling, alongside CI maintenance and typing improvements.
v2.2.510 fixesNumPy 2.2.5 is a patch release focused on fixing bugs discovered since 2.2.4, alongside significant typing improvements and CI maintenance.
v2.2.47 fixes1 featureNumPy 2.2.4 is a patch release focusing on bug fixes, platform maintenance, and significant typing improvements. It supports Python versions from 3.10 through 3.13.
v2.2.37 fixesNumPy 2.2.3 is a patch release focusing on bug fixes, particularly addressing data races related to free-threaded Python, and improving type hinting across the library.
v2.2.215 fixesNumPy 2.2.2 is a patch release focused primarily on fixing bugs and improving type hinting accuracy across various operations and functions.
Common Errors
ModuleNotFoundError3 reportsThe "ModuleNotFoundError" with numpy usually means numpy isn't installed or the current Python environment can't find it. Fix this by ensuring numpy is installed (`pip install numpy`) within the specific environment you're using (e.g., virtualenv, conda environment), and that the environment is activated before running your script. If using Pyinstaller, use a hook to ensure numpy is properly bundled with your executable.
SystemError2 reportsSystemError in NumPy often arises from incorrect type handling during operations like `astype` conversions or `np.dot` when the input array dtypes are fundamentally incompatible. To fix this, carefully examine the input array dtypes and use `astype` or other explicit conversion methods to ensure they are compatible before performing the operation. If the dtypes should work together, the library itself may have an issue so reporting to the numpy team could be useful.
RecursionError2 reportsRecursionError in NumPy arises when a function calls itself excessively without a proper base case to terminate the recursion, often triggered by deeply nested structures or flawed parsing logic. To fix it, identify the recursive function, ensure a well-defined base case that stops the recursion under specific conditions, and consider iterative approaches or increasing recursion depth limit with `sys.setrecursionlimit` as a last resort, if appropriate. Also, use try-except blocks to handle cases of malformed data.
ValueError2 reportsValueError in NumPy often arises from passing an argument of incorrect type or shape to a function (e.g., incompatible array dimensions or incorrect data type). Fix it by carefully inspecting the function's documentation for expected argument types and shapes, and ensure that the input data conforms to these requirements through type casting or reshaping if needed. Thoroughly test your code with various input scenarios, including edge cases like empty arrays, to catch such errors early.
LinAlgError1 reportLinAlgError generally arises from singular matrices or non-positive definite matrices when performing linear algebra operations like inverting a matrix or Cholesky decomposition. To resolve it, ensure your matrix is invertible (check its determinant is non-zero), or precondition it by adding a small multiple of the identity matrix to make it positive definite if appropriate; alternatively, use a more robust solver that handles singular cases like `numpy.linalg.lstsq`.
SubprocessDiedError1 reportSubprocessDiedError in NumPy often arises from running out of memory or encountering a fatal signal (like SIGSEGV) in a child process during parallel computations, especially with functions utilizing multiple cores. To mitigate this, try reducing the number of cores used by NumPy (e.g., `os.environ['NUMPY_NUM_THREADS'] = '1'`) or address the underlying memory issue by processing data in smaller chunks or optimizing memory usage within the problematic NumPy function. If the error persists, inspect the input data for corrupt or invalid values that could trigger a fatal error.
Related Data & ML Packages
An Open Source Machine Learning Framework for Everyone
🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.
Tensors and Dynamic neural networks in Python with strong GPU acceleration
scikit-learn: machine learning in Python
Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
Streamlit — A faster way to build and share data apps.
Subscribe to Updates
Get notified when new versions are released