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
I get a "DimensionError: View over subspan can only be created for contiguous range of data." when I am trying to create a 2D histogram of data, obtained upon performing coord_transform using a self-made transformation graph.
The minimal code below can be used to reproduce the error:
and use it instead of the self-defined Q_elements_from_wavelength_inelastic method (data_test DataArray needs to be updated correspondingly to keep only one 'wavelength' coordinate), then the histogramming works as expected.
The text was updated successfully, but these errors were encountered:
Hi @koshchii!
Thanks for reporting. The problem is that properties such as fields.x return a view, and some part of the subsequent code does not like the non-contiguous (stride 3) data. You can work around this by making copies of the fields:
or an equivalent reformulation of the momentum-vector math into component-based math.
We have fixed a similar problem in the past in scipp/scipp#3255, but it seems we missed another case. I have opened an issue upstream at scipp/scipp#3660.
I get a "DimensionError: View over subspan can only be created for contiguous range of data." when I am trying to create a 2D histogram of data, obtained upon performing
coord_transform
using a self-made transformation graph.The minimal code below can be used to reproduce the error:
When I import
Q_elements_from_wavelength
method from scippneutronand use it instead of the self-defined
Q_elements_from_wavelength_inelastic
method (data_test
DataArray needs to be updated correspondingly to keep only one 'wavelength' coordinate), then the histogramming works as expected.The text was updated successfully, but these errors were encountered: