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

Change 'compressor' encoding so that it contains 'id' #270

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

wachsylon
Copy link

So this is based on many assumptions that I am too lazy to validate :) but it seems plausible to me and it fixes an issue:

If a .zarray of a variable is retrieved, a pure dict is returned. I am not sure what fastapi is doing with that, but obviously, the return is a JSON. If a compressor is set, I guess the __dict__ representation of it is used.

The problem is, there is a difference between cd and cc, defined as:

import numcodecs
codec = numcodecs.Blosc(cname='zstd', clevel=5, shuffle=1, blocksize=0)
cd=codec.__dict__
cc=codec.get_config()

I assume that we want to have cc because it contains a id keyword. Without this, it is not clear that blosc was actually used.

@wachsylon
Copy link
Author

i now see that this is pretty similar to jsonify_zmetadata maybe it is possible to use this as well

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

Successfully merging this pull request may close these issues.

1 participant