Skip to content

Ambiguity between scalar value and array with shape (0,) or (1,) #881

Description

@prjemian

There exists an ambiguity in HDF5 files between scalar values and arrays with rank=1 and length of 0 or 1 item. AFAIK, we always change such items to be scalar values.

Would it be useful to add an (optional) as_scalar="true" boolean attribute to such a dataset to disambiguate? This would formalize a convention we have recognized as implicit. With the converse (as_scalar="false"), we could properly identify arrays with length of 0 or 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions