Skip to content

Commit 33109dd

Browse files
committed
Add release note
1 parent 9f2d51f commit 33109dd

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Improve `flatiter` indexing by using ndarray index preparation
2+
--------------------------------------------------------------
3+
4+
The `flatiter`` object now shares the same index preparation logic as
5+
`ndarray`, ensuring consistent behavior and fixing several issues where
6+
invalid indices were previously accepted or misinterpreted.
7+
8+
Key fixes and improvements:
9+
10+
* Stricter index validation
11+
12+
``arr.flat[[True, True]]`` and ``arr.flat[[1.0, 1.0]]`` were incorrectly
13+
treated as ``arr.flat[[1, 1]]``. They now raise an `IndexError`` (unless
14+
``arr.flat[[True, Truee]]`` is a valid boolean index)
15+
16+
* Fixed crash when assigning to an empty index tuple:
17+
18+
``arr.flat[()] = 0`` previously crashed the Python interpreter. It now
19+
correctly assigns to the entire array.
20+
21+
* Consistent error types:
22+
23+
Certain invalid `flatiter` indices that previously raised `ValueError`
24+
now correctly raise `IndexError`, aligning with `ndarray` behavior.
25+
26+
* Improved error messages:
27+
28+
The error message for unsupported index operations now provides more
29+
specific details, including explicitly listing the valid index types,
30+
instead of the generic ``IndexError: unsupported index operation``.

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