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

set_array_compression function appears to not work #509

Closed
drdavella opened this issue May 25, 2018 · 0 comments
Closed

set_array_compression function appears to not work #509

drdavella opened this issue May 25, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@drdavella
Copy link
Contributor

Consider the following example code:

import asdf
import numpy as np

# Create separate arrays so that they use separate data blocks
zlib_data = np.array([x for x in range(1000)])
bzp2_data = np.array([x for x in range(1000)])

tree = dict(zlib_data=zlib_data, bzp2_data=bzp2_data)
with asdf.AsdfFile(tree) as af:
    af.set_array_compression(zlib_data, 'zlib')
    af.set_array_compression(bzp2_data, 'bzp2')
    af.write_to(outfile)

In this case, neither block ends up being compressed. Presumably, the compression algorithm ends up being overridden by the default value of the all_array_compression parameter to write_to.

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

No branches or pull requests

1 participant