Change8

v2.3.0rc1

📦 numpyView on GitHub →
6 features2 deprecations🔧 36 symbols

Summary

NumPy 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.

Migration Steps

  1. If you were using numpy.typing.mypy_plugin, remove it from the plugins section of your mypy configuration.
  2. For type parameter bounds previously using numpy.typing.NBitBase, refactor to use typing.overload as demonstrated in the release notes.

✨ New Features

  • Interactive examples in the NumPy documentation.
  • Building NumPy with OpenMP Parallelization.
  • Preliminary support for Windows on ARM.
  • Improved support for free threaded Python.
  • Improved annotations.
  • New function numpy.strings.slice added, which implements fast native slicing of string arrays supporting the full slicing API.

🔧 Affected Symbols

numpy.typing.mypy_pluginnumpy.typing.NBitBasenumpy.strings.slicenp.tostringnp.conjugatenp.bincountnp.fromfilenp.fromstringdatetime64timedelta64np.boolnp.outernp.compatNPY_OWNDATANPY_ARRAY_OWNDATAgenerate_divbyzero_errornpy_set_floatstatus_divbyzerogenerate_overflow_errornpy_set_floatstatus_overflow__array_finalize__np.complexfloatingnp.floatingnp.complex64np.float32np.complex128np.float64np.clongdoublenp.longdoublenp.inexactnp.genericnp.complexnp.integernp.signedintegernp.unsignedintegerroundnp.round

⚡ Deprecations

  • The numpy.typing.mypy_plugin has been deprecated in favor of platform-agnostic static type inference. Remove numpy.typing.mypy_plugin from the plugins section of your mypy configuration.
  • The numpy.typing.NBitBase type has been deprecated and will be removed in a future version. Use typing.overload instead for generic upper bounds on type-parameters.