Skip to content

Commit 3b5e6d8

Browse files
committed
DOC: add 2.0 release note highlights and narrative content
[skip actions] [skip azp] [skip cirrus]
1 parent cbaba3f commit 3b5e6d8

File tree

4 files changed

+82
-0
lines changed

4 files changed

+82
-0
lines changed

doc/source/dev/depending_on_numpy.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ alongside other, newer packages
175175
`here for SciPy <https://github.com/MacPython/scipy-wheels>`__.
176176

177177

178+
.. _numpy-2-abi-handling:
179+
178180
NumPy 2.0-specific advice
179181
~~~~~~~~~~~~~~~~~~~~~~~~~
180182

doc/source/reference/module_structure.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _module-structure:
2+
13
************************
24
NumPy's module structure
35
************************

doc/source/release/2.0.0-notes.rst

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,82 @@
44
NumPy 2.0.0 Release Notes
55
=========================
66

7+
NumPy 2.0.0 is the first major release since 2006. It is the result of X months
8+
of development since the last feature release by Y contributors, and contains a
9+
large amount of exciting new features as well as a large amount of changes to
10+
both the Python and C APIs.
11+
12+
Highlights of this release include:
13+
14+
- New features:
15+
16+
- A new variable-length string dtype, `~numpy.dtypes.StringDType` and a new
17+
`numpy.strings` namespace with performant ufuncs ...
18+
- Support for ``float32`` and ``longdouble`` in all `numpy.fft` functions,
19+
- Support for the array API standard in the main ``numpy`` namespace
20+
21+
- Performance improvements:
22+
23+
- Sorting functions (`sort`, `argsort`, `partition`)
24+
have been accelerated through use of SIMD kernels and Highway, and may
25+
see large (hardware-specific) speedups,
26+
- macOS Accelerate support and binary wheels for macOS >=14, with significant
27+
performance improvements for linear algebra operations on macOS
28+
- `numpy.char` fixed-length string dtypes have been accelerated, ...
29+
- A new tracing and introspection API to determine which hardware-specific
30+
kernels are available and will be dispatched to ... see
31+
`~numpy.lib.introspect.opt_func_info`
32+
33+
- Python API improvements:
34+
35+
- A clear split between public and private API, with a new
36+
:ref:`module structure <module-structure>`, and each public function now
37+
available in a single place,
38+
- Many removals of non-recommended functions and aliases. This should make
39+
it easier to learn and use NumPy. The number of objects in the main
40+
namespace decreased by ~10% and in ``numpy.lib`` by ~80%,
41+
- :ref:`Canonical dtype names <canonical-python-and-c-types>` and a new
42+
`~numpy.isdtype` introspection function,
43+
44+
- C API improvements:
45+
46+
- A new public C API for creating custom dtypes
47+
- Many outdated functions and macros removed, and private internals hidden to
48+
ease future extensibility,
49+
- New, easier to use, initialization functions,
50+
51+
- Improved behavior:
52+
53+
- Improvements to type promotion behavior (NEP 50) ...
54+
- The default integer type on Windows is now ``int64`` rather than ``int32``,
55+
matching the behavior on other platform,
56+
- The maximum number of array dimensions is changed from 32 to 64
57+
58+
- Documentation:
59+
60+
- The reference guide navigation was signficantly improved, and there is now
61+
documentation on NumPy's :ref:`module structure <module-structure>`,
62+
- The :ref:`building from source <building-from-source>` documentation was
63+
completely rewritten,
64+
65+
Furthermore there are many changes to NumPy internals, including continuing to
66+
migrate code from C to C++, that will make it easier to improve and maintain
67+
NumPy in the future.
68+
69+
The "no free lunch" theorem dictates that there is a price to pay for all these
70+
API and behavior improvements and better future extensibility. This price is:
71+
72+
1. Backwards compatibility - clear errors in most cases; see the Deprecation
73+
and Compatibility sections below, and the :ref:`numpy-2-migration-guide`
74+
(note: there is a ``ruff`` mode to auto-fix many things in Python code)
75+
2. ABI change - impact on downstream libraries and binaries. See
76+
:ref:`numpy-2-abi-handling`.
77+
TODO: main messages.
78+
79+
80+
The Python versions supported by this release are 3.9-3.12.
81+
82+
783

884
NumPy 2.0 Python API removals
985
=============================

doc/source/user/basics.types.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ use an unstructured void data type::
140140
Advanced types, not listed above, are explored in section
141141
:ref:`structured_arrays`.
142142

143+
.. _canonical-python-and-c-types:
144+
143145
Relationship Between NumPy Data Types and C Data Data Types
144146
===========================================================
145147

0 commit comments

Comments
 (0)