@@ -36,23 +36,24 @@ Highlights of this release include:
36
36
- New features:
37
37
38
38
- A new variable-length string dtype, `~numpy.dtypes.StringDType ` and a new
39
- `numpy.strings ` namespace with performant ufuncs ...
39
+ `numpy.strings ` namespace with performant ufuncs for string operations,
40
40
- Support for ``float32 `` and ``longdouble `` in all `numpy.fft ` functions,
41
- - Support for the array API standard in the main ``numpy `` namespace
41
+ - Support for the array API standard in the main ``numpy `` namespace.
42
42
43
43
- Performance improvements:
44
44
45
45
- Sorting functions (`sort `, `argsort `, `partition `, `argpartition `)
46
46
have been accelerated through the use of the Intel x86-simd-sort and Google
47
47
Highway libraries, and may see large (hardware-specific) speedups,
48
48
- macOS Accelerate support and binary wheels for macOS >=14, with significant
49
- performance improvements for linear algebra operations on macOS
49
+ performance improvements for linear algebra operations on macOS, and wheels
50
+ that are about 3 times smaller,
50
51
- `numpy.char ` fixed-length string operations have been accelerated by
51
52
implementing ufuncs that also support `~numpy.dtypes.StringDType ` in
52
- addition to the the fixed-length string dtypes.
53
- - A new tracing and introspection API to determine which hardware-specific
54
- kernels are available and will be dispatched to ... see
55
- ` ~numpy.lib.introspect.opt_func_info `
53
+ addition to the the fixed-length string dtypes,
54
+ - A new tracing and introspection API, ` ~numpy.lib.introspect.opt_func_info `,
55
+ to determine which hardware-specific kernels are available and will be
56
+ dispatched to.
56
57
57
58
- Python API improvements:
58
59
@@ -67,10 +68,11 @@ Highlights of this release include:
67
68
68
69
- C API improvements:
69
70
70
- - A new public C API for creating custom dtypes
71
+ - A new :ref: ` public C API for creating custom dtypes < dtype-api >`,
71
72
- Many outdated functions and macros removed, and private internals hidden to
72
73
ease future extensibility,
73
- - New, easier to use, initialization functions,
74
+ - New, easier to use, initialization functions:
75
+ :c:func: `PyArray_ImportNumPyAPI ` and :c:func: `PyUFunc_ImportUFuncAPI `.
74
76
75
77
- Improved behavior:
76
78
@@ -98,12 +100,27 @@ NumPy in the future.
98
100
The "no free lunch" theorem dictates that there is a price to pay for all these
99
101
API and behavior improvements and better future extensibility. This price is:
100
102
101
- 1. Backwards compatibility - clear errors in most cases; see the Deprecation
102
- and Compatibility sections below, and the :ref: `numpy-2-migration-guide `
103
- (note: there is a ``ruff `` mode to auto-fix many things in Python code)
104
- 2. ABI change - impact on downstream libraries and binaries. See
105
- :ref: `numpy-2-abi-handling `.
106
- TODO: main messages.
103
+ 1. Backwards compatibility. There are a significant number of breaking changes
104
+ to both the Python and C APIs. In the majority of cases, there are clear
105
+ error messages that will inform the user how to adapt their code. However,
106
+ there are also changes in behavior for which it was not possible to give
107
+ such an error message - these cases are all covered in the Deprecation and
108
+ Compatibility sections below, and in the :ref: `numpy-2-migration-guide `.
109
+
110
+ Note that there is a ``ruff `` mode to auto-fix many things in Python code.
111
+
112
+ 2. Breaking changes to the NumPy ABI. As a result, binaries of packages that
113
+ use the NumPy C API and were built against a NumPy 1.xx release will not
114
+ work with NumPy 2.0. On import, such packages will see an ``ImportError ``
115
+ with a message about binary incompatibiliy.
116
+
117
+ It is possible to build binaries against NumPy 2.0 that will work at runtime
118
+ with both NumPy 2.0 and 1.x. See :ref: `numpy-2-abi-handling ` for more details.
119
+
120
+ **All downstream packages that depend on the NumPy ABI are advised to do a
121
+ new release built against NumPy 2.0 and verify that that release works with
122
+ both 2.0 and 1.26 - ideally in the period between 2.0.0rc1 (which will be
123
+ ABI-stable) and the final 2.0.0 release to avoid problems for their users. **
107
124
108
125
The Python versions supported by this release are 3.9-3.12.
109
126
0 commit comments