Skip to content

Commit

Permalink
numexpr dims
Browse files Browse the repository at this point in the history
  • Loading branch information
jpn-- committed Oct 28, 2024
1 parent fc5df6c commit ea8174f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sharrow/relationships.py
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,13 @@ def get_expr(
else:
if dtype is not None:
result = result.astype(dtype)
# numexpr doesn't carry over the dimension names or coords
result = result.rename(
{result.dims[i]: self.root_dims[i] for i in range(result.ndim)}
)
if with_coords:
result = result.assign_coords(self.root_dataset.coords)

elif engine == "pandas-numexpr":
from xarray import DataArray

Expand Down

0 comments on commit ea8174f

Please sign in to comment.