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

Fixing Errors with the fill_special Method for Filling an SChunk with Special Values. #250

Closed
omaech opened this issue Sep 9, 2024 · 0 comments

Comments

@omaech
Copy link
Collaborator

omaech commented Sep 9, 2024

When trying to use the fill_special method to fill an SChunk with a special value, I encountered an error related to the provided value. The issue was with how the special value was assigned to special_value. Initially, I tried using: special_value = blosc2.SpecialValue.VALUE. However, this assignment was incorrect because SpecialValue.VALUE was not the appropriate value and required an additional parameter to be correctly interpreted. The solution was to use a valid special value that does not require additional parameters. Instead of SpecialValue.VALUE, I used SpecialValue.ZERO, which is a predefined special value suitable for this purpose.

Additionally, the fill_special() method can be used to create arrays of zeros, NaNs, or other specific values, rather than relying on current approaches that use NumPy tricks (e.g., blosc2_ext.zeros() or blosc2_ext.full()).

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