Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Jul 28, 2024
1 parent 903afaa commit d23cd79
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flox/xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,9 @@ def wrapper(array, *by, func, skipna, core_dims, **kwargs):
(newdim,) = quantile_new_dims_func(**finalize_kwargs)
elif func == "topk":
(newdim,) = topk_new_dims_func(**finalize_kwargs)
if not newdim.is_scalar:
else:
newdim = None
if newdim is not None and not newdim.is_scalar:
# NOTE: _restore_dim_order will move any new dims to the end anyway.
# This transpose is simply makes it easy to specify output_core_dims
# output dim order: (*broadcast_dims, *group_dims, quantile_dim)
Expand Down

0 comments on commit d23cd79

Please sign in to comment.