Skip to content

BUG: np.save and np.load do not properly handle dtype.metadata #15017

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

Closed
mattip opened this issue Nov 30, 2019 · 1 comment
Closed

BUG: np.save and np.load do not properly handle dtype.metadata #15017

mattip opened this issue Nov 30, 2019 · 1 comment

Comments

@mattip
Copy link
Member

mattip commented Nov 30, 2019

xref gh-14142 (issue) and gh-14994 (always warn when saving an array with metadata).

Dtypes with metadata, or with subdtypes with metadata, either discard the metadata when saving via np.save, or crash when loading them via np.load.

Currently the "fix" adopted in 1.18 is to always warn.

EDIT (seberg): Giving the warning message:

metadata on a dtype may be saved or ignored, but will raise if saved when read. Use another form of storage.
@seberg
Copy link
Member

seberg commented Aug 8, 2024

I'll close this. We are not almost perfect at dropping metadata with the warning, I think. Dunno if that is the right state, but I think a new issue woudl be better for it.

@seberg seberg closed this as completed Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants