Skip to content

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

@omaech

Description

@omaech

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()).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions