partition: keepdims on slices1d
h5py: robust to chunksizes with singleton dimensions