Skip to content

disallow numpy scalars for metadata.fill_value #3025

Open
@d-v-b

Description

@d-v-b

Right now the fill_value attribute of our metadata classes is a numpy scalar, or None, or a string (i think). This is problematic for comparing two metadata instances -- if the fill value is np.nan, then np.nan == np.nan is always false, even when the two values are in fact the same.

We could address this by disallowing numpy scalars for the fill_value attribute. Instead, we could use a custom scalar wrapper class that handles NaN correctly, or use a JSON-serializable form of the scalar, e.g. a string in the case of np.nan.

see also: #2929

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