Skip to content
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

Deserializing arrays should not trigger load_metadata #1795

Open
rabernat opened this issue Apr 16, 2024 · 0 comments
Open

Deserializing arrays should not trigger load_metadata #1795

rabernat opened this issue Apr 16, 2024 · 0 comments

Comments

@rabernat
Copy link
Contributor

Currently the __setstate__ method on Array just calls __init__.

zarr-python/zarr/core.py

Lines 2567 to 2568 in 6105ef2

def __setstate__(self, state):
self.__init__(**state)

And __init__ contains a call to load_metadata

zarr-python/zarr/core.py

Lines 169 to 170 in 6105ef2

# initialize metadata
self._load_metadata()

This really doesn't make much sense. We should serialize the metadata up with the array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant