Skip to content

np.load() fails to read empty archive created by np.savez() #9989

@jzwinck

Description

@jzwinck

Try this:

np.savez('nothing.npz') # OK
np.load('nothing.npz') # error

Loading fails:

OSError: Failed to interpret file 'nothing.npz' as a pickle

It should succeed (and give you an object with no arrays inside). Likewise for savez_compressed() (which also currently fails).

I'm using NumPy 1.13.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions