We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Compressors
extensions
asdf.AsdfFile.__init__
Providing a Compressor via an Extension listed in the extensions argument to asdf.AsdfFile.__Init__ does not work as expected.
Compressor
Extension
asdf.AsdfFile.__Init__
import asdf import numpy as np class MyCompressor: label = b"hgtg" def compress(self, data, **kwargs): yield b"42" def decompress(self, blocks, out, **kwargs): return 0 class MyExtension: compressors = [MyCompressor()] extension_uri = "asdf://example.com/foo-1.0.0" arr = np.array([1, 2, 3]) tree = {'arr': arr} # works via context with asdf.config_context() as cfg: cfg.add_extension(MyExtension()) af = asdf.AsdfFile() af["arr"] = arr af.set_array_compression(arr, "hgtg") af.write_to("test.asdf") af = asdf.AsdfFile(extensions=[MyExtension()]) af["arr"] = arr af.set_array_compression(arr, "hgtg") af.write_to("test.asdf") # this fails with ValueError: Invalid compression type: hgtg
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Providing a
Compressor
via anExtension
listed in theextensions
argument toasdf.AsdfFile.__Init__
does not work as expected.The text was updated successfully, but these errors were encountered: