Workaround for scalar HDF datasets: These may return dimension 0, but we treat them as one-dimensional.