@@ -49,7 +49,8 @@ towards support for newer SIMD instruction sets, like SVE on arm64, is ongoing.
49
49
50
50
Other performance improvement ideas include:
51
51
52
- - A better story around parallel execution.
52
+ - A better story around parallel execution (related is support for free-threaded
53
+ CPython, see further down).
53
54
- Optimizations in individual functions.
54
55
55
56
Furthermore we would like to improve the benchmarking system, in terms of coverage,
@@ -84,8 +85,8 @@ Extensibility
84
85
We aim to continue making it easier to extend NumPy. The primary topic here is to
85
86
improve the dtype system - see for example :ref: `NEP41 ` and related NEPs linked
86
87
from it. In NumPy 2.0, a `new C API for user-defined dtypes <https://numpy.org/devdocs/reference/c-api/array.html#custom-data-types >`__
87
- was made public. We aim
88
- to encourage its usage and improve this API further .
88
+ was made public. We aim to encourage its usage and improve this API further,
89
+ including support for writing a dtype in Python .
89
90
90
91
Ideas for new dtypes that may be developed outside of the main NumPy repository
91
92
first, and that could potentially be upstreamed into NumPy later, include:
@@ -121,6 +122,8 @@ We intend to write a NEP covering the support levels we provide and what is
121
122
required for a platform to move to a higher tier of support, similar to
122
123
`PEP 11 <https://peps.python.org/pep-0011/ >`__.
123
124
125
+ Support for free-threaded CPython
126
+ `````````````````````````````````
124
127
CPython 3.13 will be the first release to offer a free-threaded build (i.e.,
125
128
a CPython build with the GIL disabled). Work is in progress to support this
126
129
well in NumPy. After that is stable and complete, there may be opportunities to
@@ -131,14 +134,37 @@ Binary size reduction
131
134
`````````````````````
132
135
The number of downloads of NumPy from PyPI and other platforms continues to
133
136
increase - as of May 2024 we're at >200 million downloads/month from PyPI
134
- alone) . Reducing the size of an installed NumPy package has many benefits:
137
+ alone. Reducing the size of an installed NumPy package has many benefits:
135
138
faster installs, lower disk space usage, smaller load on PyPI, less
136
- environmental impact, easier to fit more packages on top of NumPy into an AWS
137
- Lambda layer, lower latency for Pyodide users, and so on. We aim for
138
- significant reductions, as well as making it easier for end users and packagers
139
- to produce smaller custom builds (e.g., we added support for stripping tests
140
- before 2.1.0). See `gh-25737 <https://github.com/numpy/numpy/issues/25737 >`__
141
- for details.
139
+ environmental impact, easier to fit more packages on top of NumPy in
140
+ resource-constrained environments and platforms like AWS Lambda, lower latency
141
+ for Pyodide users, and so on. We aim for significant reductions, as well as
142
+ making it easier for end users and packagers to produce smaller custom builds
143
+ (e.g., we added support for stripping tests before 2.1.0). See
144
+ `gh-25737 <https://github.com/numpy/numpy/issues/25737 >`__ for details.
145
+
146
+ Support use of CPython's limited C API
147
+ ``````````````````````````````````````
148
+ Use of the CPython limited C API, allowing producing ``abi3 `` wheels that use
149
+ the stable ABI and are hence independent of CPython feature releases, has
150
+ benefits for both downstream packages that use NumPy's C API and for NumPy
151
+ itself. In NumPy 2.0, work was done to enable using the limited C API with
152
+ the Cython support in NumPy (see `gh-25531 <https://github.com/numpy/numpy/pull/25531 `__).
153
+ More work and testing is needed to ensure full support for downstream packages.
154
+
155
+ We also want to explore what is needed for NumPy itself to use the limited
156
+ C API - this would make testing new CPython dev and pre-release versions across
157
+ the ecosystem easier, and significantly reduce the maintenance effort for CI
158
+ jobs in NumPy itself.
159
+
160
+ Create a header-only package for NumPy
161
+ ``````````````````````````````````````
162
+ We have reduced the platform-dependent content in the public NumPy headers to
163
+ almost nothing. It is now feasible to create a separate package with only
164
+ NumPy headers and a discovery mechanism for them, in order to enable downstream
165
+ packages to build against the NumPy C API without having NumPy installed.
166
+ This will make it easier/cheaper to use NumPy's C API, especially on more
167
+ niche platforms for which we don't provide wheels.
142
168
143
169
144
170
NumPy 2.0 stabilization & downstream usage
0 commit comments