Closed kjnam closed 1 month ago
v2024.06.0
Conda
_slice_from_grid function in dataarray.py creates a tuple for the node centered case, unlike the other two cases. https://github.com/UXARRAY/uxarray/blob/49fd637bb96b193e9e1d011396f56d4f35a73267/uxarray/core/dataarray.py#L1075-L1080 This causes a ValueError exception due to a wrong dim while creating a new UxDataArray in the following lines. The UxDataArray constructor expects a numpy array for the data.
_slice_from_grid
dataarray.py
UxDataArray
I was expecting that the function slices and creates a subset UxDataArray for the node centered dataset without an error.
No response
Version
v2024.06.0
How did you install UXarray?
Conda
What happened?
_slice_from_grid
function indataarray.py
creates a tuple for the node centered case, unlike the other two cases. https://github.com/UXARRAY/uxarray/blob/49fd637bb96b193e9e1d011396f56d4f35a73267/uxarray/core/dataarray.py#L1075-L1080 This causes a ValueError exception due to a wrong dim while creating a newUxDataArray
in the following lines. TheUxDataArray
constructor expects a numpy array for the data.What did you expect to happen?
I was expecting that the function slices and creates a subset UxDataArray for the node centered dataset without an error.
Can you provide a MCVE to repoduce the bug?
No response