Closed rayosborn closed 7 years ago
If I load a two-dimensional slab from a three-dimensional array, I get a numpy array with ndim=2 in h5py, but ndim=3 in h5pyd, with one of the dimensions of size 1.
ndim=2
ndim=3
The following accesses the same file on the remote server and stored locally:
>>> import h5pyd as h5d >>> a=h5d.File('mullite_300K.mullite.exfac', mode='r', endpoint='http://some.server:5000') >>> a['/entry/transform/v'][400].shape (1, 901, 901) >>> import h5py as h5 >>> b=h5.File('mullite/mullite_300K.nxs') >>> b['/entry/transform/v'][400].shape (901, 901)
This should be fixed - just needed to use np.squeeze on the result.
Yes, that has fixed it. It's how I fixed it in my own code.
ok - closing.
If I load a two-dimensional slab from a three-dimensional array, I get a numpy array with
ndim=2
in h5py, butndim=3
in h5pyd, with one of the dimensions of size 1.The following accesses the same file on the remote server and stored locally: