Skip to content

Conversation

charris
Copy link
Member

@charris charris commented Jul 22, 2025

Backport of #29313.

Retrieving a from an npz file will first check for a file a, then for a.npy; this checks both.

Fixes #29282

* TST: Add test for non-npy files in npz and different names

Retrieving `a` from an npz file will first check for a file `a`, then for `a.npy`; this checks both.

* BUG: Argument to read should be int not str

Old behavior is to read everything, which will happen if I pass no argument.

---------

Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
@charris charris added this to the 2.3.2 release milestone Jul 22, 2025
@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs labels Jul 22, 2025
@charris charris changed the base branch from main to maintenance/2.3.x July 22, 2025 15:22
@charris charris merged commit 6dfdc37 into numpy:maintenance/2.3.x Jul 22, 2025
10 checks passed
@charris charris deleted the backport-29313 branch July 22, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
00 - Bug 08 - Backport Used to tag backport PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I think key is a string and read() expects an int. Should this be just
2 participants