Skip to content

Commit

Permalink
More typing
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Oct 20, 2022
1 parent fba65b3 commit 9fa4712
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flox/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,9 +888,9 @@ def _conc2(x_chunk, key1, key2=slice(None), axis: T_Axes = None) -> np.ndarray:
# return concatenate3(mapped)


def reindex_intermediates(x: IntermediateDict, agg: Aggregation, unique_groups):
def reindex_intermediates(x: IntermediateDict, agg: Aggregation, unique_groups) -> IntermediateDict:
new_shape = x["groups"].shape[:-1] + (len(unique_groups),)
newx = {"groups": np.broadcast_to(unique_groups, new_shape)}
newx: IntermediateDict = {"groups": np.broadcast_to(unique_groups, new_shape)}
newx["intermediates"] = tuple(
reindex_(
v, from_=np.atleast_1d(x["groups"].squeeze()), to=pd.Index(unique_groups), fill_value=f
Expand Down

0 comments on commit 9fa4712

Please sign in to comment.