Skip to content

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

Closed
@mattip

Description

@mattip

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions