You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
H5py currently doesn't support adding np.newaxis when slicing a data array.
with h5py.File(file, 'r') as F:
return F[array_group][:,np.newaxis,:,:]
as following return is given:
' File "", line 77, in read_hdf_frame_v1
return F[array_group][:,np.newaxis,:,:]
File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "\lib\site-packages\h5py_hl\dataset.py", line 831, in getitem
selection = sel.select(self.shape, args, dataset=self)
File "****lib\site-packages\h5py_hl\selections.py", line 82, in select
return selector.make_selection(args)
File "h5py_selector.pyx", line 282, in h5py._selector.Selector.make_selection
File "h5py_selector.pyx", line 181, in h5py._selector.Selector.apply_args
TypeError: Selection can't process None'
@aragilar I don't really see how to improve the current message. Admittedly it may not be obvious to every user that np.newaxis is an alias to None, which might cause some confusion, but I don't think we can distinguish the two variables at runtime (precisely because they're really the same object). Maybe we could special case None so that np.newaxis in mentionned in the error message ?
Description:
H5py currently doesn't support adding np.newaxis when slicing a data array.
as following return is given:
' File "", line 77, in read_hdf_frame_v1
return F[array_group][:,np.newaxis,:,:]
File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "\lib\site-packages\h5py_hl\dataset.py", line 831, in getitem
selection = sel.select(self.shape, args, dataset=self)
File "****lib\site-packages\h5py_hl\selections.py", line 82, in select
return selector.make_selection(args)
File "h5py_selector.pyx", line 282, in h5py._selector.Selector.make_selection
File "h5py_selector.pyx", line 181, in h5py._selector.Selector.apply_args
TypeError: Selection can't process None'
'Summary of the h5py configuration
h5py 3.10.0
HDF5 1.14.2
Python 3.10.13 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:24:38) [MSC v.1916 64 bit (AMD64)]
sys.platform win32
sys.maxsize 9223372036854775807
numpy 1.26.4
cython (built with) 0.29.36
numpy (built against) 1.21.6
HDF5 (built against) 1.14.2'
The text was updated successfully, but these errors were encountered: