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