Skip to content

Commit ec4741f

Browse files
committed
Merge branch 'numpy:main' into issue-26159
2 parents cc28e42 + 4ff1cc1 commit ec4741f

File tree

81 files changed

+1195
-714
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1195
-714
lines changed

.github/workflows/emscripten.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
fetch-tags: true
5050
persist-credentials: false
5151

52-
- uses: pypa/cibuildwheel@5f22145df44122af0f5a201f93cf0207171beca7 # v3.0.0
52+
- uses: pypa/cibuildwheel@95d2f3a92fbf80abe066b09418bbf128a8923df2 # v3.0.1
5353
env:
5454
CIBW_PLATFORM: pyodide
5555

.github/workflows/wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ jobs:
175175
fi
176176
177177
- name: Build wheels
178-
uses: pypa/cibuildwheel@5f22145df44122af0f5a201f93cf0207171beca7 # v3.0.0
178+
uses: pypa/cibuildwheel@95d2f3a92fbf80abe066b09418bbf128a8923df2 # v3.0.1
179179
env:
180180
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
181181

.github/workflows/windows_arm64.yml

Lines changed: 0 additions & 208 deletions
This file was deleted.

doc/neps/nep-0038-SIMD-optimizations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ NEP 38 — Using SIMD optimization instructions for performance
88
:Status: Final
99
:Type: Standards
1010
:Created: 2019-11-25
11-
:Resolution: https://mail.python.org/archives/list/numpy-discussion@python.org/thread/PVWJ74UVBRZ5ZWF6MDU7EUSJXVNILAQB/#PVWJ74UVBRZ5ZWF6MDU7EUSJXVNILAQB
11+
:Resolution: `NumPy Discussion <https://mail.python.org/archives/list/numpy-discussion@python.org/thread/PVWJ74UVBRZ5ZWF6MDU7EUSJXVNILAQB/#PVWJ74UVBRZ5ZWF6MDU7EUSJXVNILAQB>`_
1212

1313

1414
Abstract

doc/neps/nep-0049.rst renamed to doc/neps/nep-0049-data-allocation-strategies.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ NEP 49 — Data allocation strategies
88
:Status: Final
99
:Type: Standards Track
1010
:Created: 2021-04-18
11-
:Resolution: https://mail.python.org/archives/list/numpy-discussion@python.org/thread/YZ3PNTXZUT27B6ITFAD3WRSM3T3SRVK4/#PKYXCTG4R5Q6LIRZC4SEWLNBM6GLRF26
12-
11+
:Resolution: `NumPy Discussion <https://mail.python.org/archives/list/numpy-discussion@python.org/thread/YZ3PNTXZUT27B6ITFAD3WRSM3T3SRVK4/#PKYXCTG4R5Q6LIRZC4SEWLNBM6GLRF26>`_
1312

1413
Abstract
1514
--------
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Improved error message for `assert_array_compare`
2+
-------------------------------------------------
3+
The error message generated by `assert_array_compare` which is used by functions
4+
like `assert_allclose`, `assert_array_less` etc. now also includes information
5+
about the indices at which the assertion fails.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
``align=`` must be passed as boolean to ``np.dtype()``
2+
------------------------------------------------------
3+
When creating a new ``dtype`` a ``VisibleDeprecationWarning`` will be
4+
given if ``align=`` is not a boolean.
5+
This is mainly to prevent accidentally passing a subarray align flag where it
6+
has no effect, such as ``np.dtype("f8", 3)`` instead of ``np.dtype(("f8", 3))``.
7+
We strongly suggest to always pass ``align=`` as a keyword argument.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
``__array_interface__`` with NULL pointer changed
2+
-------------------------------------------------
3+
The array interface now accepts NULL pointers (NumPy will do
4+
its own dummy allocation, though).
5+
Previously, these incorrectly triggered an undocumented
6+
scalar path.
7+
In the unlikely event that the scalar path was actually desired,
8+
you can (for now) achieve the previous behavior via the correct
9+
scalar path by not providing a ``data`` field at all.

doc/source/reference/arrays.classes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Note that :func:`asarray` always returns the base-class ndarray. If
3232
you are confident that your use of the array object can handle any
3333
subclass of an ndarray, then :func:`asanyarray` can be used to allow
3434
subclasses to propagate more cleanly through your subroutine. In
35-
principal a subclass could redefine any aspect of the array and
35+
principle, a subclass could redefine any aspect of the array and
3636
therefore, under strict guidelines, :func:`asanyarray` would rarely be
3737
useful. However, most subclasses of the array object will not
3838
redefine certain aspects of the array object such as the buffer

doc/source/reference/arrays.interface.rst

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ This approach to the interface consists of the object having an
120120

121121
**Default**: ``[('', typestr)]``
122122

123-
**data** (optional)
123+
**data**
124124
A 2-tuple whose first argument is a :doc:`Python integer <python:c-api/long>`
125125
that points to the data-area storing the array contents.
126126

@@ -136,15 +136,23 @@ This approach to the interface consists of the object having an
136136

137137
This attribute can also be an object exposing the
138138
:ref:`buffer interface <bufferobjects>` which
139-
will be used to share the data. If this key is not present (or
140-
returns None), then memory sharing will be done
141-
through the buffer interface of the object itself. In this
139+
will be used to share the data. If this key is ``None``, then memory sharing
140+
will be done through the buffer interface of the object itself. In this
142141
case, the offset key can be used to indicate the start of the
143142
buffer. A reference to the object exposing the array interface
144143
must be stored by the new object if the memory area is to be
145144
secured.
146145

147-
**Default**: ``None``
146+
.. note::
147+
Not specifying this field uses a "scalar" path that we may remove in the future
148+
as we are not aware of any users. In this case, NumPy assigns the original object
149+
as a scalar into the array.
150+
151+
.. versionchanged:: 2.4
152+
Prior to NumPy 2.4 a ``NULL`` pointer used the undocumented "scalar" path
153+
and was thus usually not accepted (and triggered crashes on some paths).
154+
After NumPy 2.4, ``NULL`` is accepted, although NumPy will create a 1-byte sized
155+
new allocation for the array.
148156

149157
**strides** (optional)
150158
Either ``None`` to indicate a C-style contiguous array or

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy