Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting RTDC_HDF5 object with non-scalar, non-innate feature and active filters will throw Error #166

Closed
maxschloegel opened this issue Feb 4, 2022 · 0 comments

Comments

@maxschloegel
Copy link
Contributor

maxschloegel commented Feb 4, 2022

Similar to issue #165 , the exporting of an RTDC_HDF5 instance (with non-scalar, non-innate plugin/temporary features) via ds.export.hdf5(..., filtering=True) will lead to

TypeError                                 Traceback (most recent call last)
<ipython-input-10-20cbf35c3674> in <module>
----> 1 ds.export.hdf5('non_scalar_test_export.rtdc', features=ds.features)

~/development/projects/dclab/dclab/rtdc_dataset/export.py in hdf5(self, path, features, filtered, override, compression)
    241                 else:
    242                     # We have to filter and will be slower
--> 243                     store_filtered_feature(rtdc_writer=hw,
    244                                            feat=feat,
    245                                            data=self.rtdc_ds[feat],

~/development/projects/dclab/dclab/rtdc_dataset/export.py in store_filtered_feature(rtdc_writer, feat, data, filtarr)
    376                 hw.store_feature("trace", {tr: trstack[:jj, :]})
    377     else:
--> 378         hw.store_feature(feat, data[filtarr])
    379 
    380 

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

~/.venvs/dcland/lib/python3.8/site-packages/h5py/_hl/dataset.py in __getitem__(self, args, new_dtype)
    781 
    782         # Perform the dataspace selection.
--> 783         selection = sel.select(self.shape, args, dataset=self)
    784 
    785         if selection.nselect == 0:

~/.venvs/dcland/lib/python3.8/site-packages/h5py/_hl/selections.py in select(shape, args, dataset)
     62         elif isinstance(arg, np.ndarray) and arg.dtype.kind == 'b':
     63             if arg.shape != shape:
---> 64                 raise TypeError("Boolean indexing array has incompatible shape")
     65             return PointSelection.from_mask(arg)
     66 

TypeError: Boolean indexing array has incompatible shape
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant