Skip to content

BUG: Allow reading non-npy files in npz and add test #29412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2025

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
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