Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit33109dd

Browse files
committed
Add release note
1 parent9f2d51f commit33109dd

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)

[8]ページ先頭

©2009-2025 Movatter.jp