Skip to content

Commit 549f105

Browse files
committed
Create namedtuple at import time
1 parent e656e9b commit 549f105

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flox/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
IntermediateDict = Dict[Union[str, Callable], Any]
3232
FinalResultsDict = Dict[str, Union["DaskArray", np.ndarray]]
33+
FactorProps = namedtuple("FactorProps", "offset_group nan_sentinel")
3334

3435

3536
def _get_aggregate(engine):
@@ -358,7 +359,6 @@ def factorize_(by: Tuple, axis, expected_groups: Tuple = None, isbin: Tuple = No
358359
nan_sentinel = size + 1 if offset_group else ngroups + 1
359360
group_idx[group_idx == -1] = nan_sentinel
360361

361-
FactorProps = namedtuple("FactorProps", "offset_group nan_sentinel")
362362
props = FactorProps(offset_group, nan_sentinel)
363363
return group_idx, found_groups, grp_shape, ngroups, size, props
364364

0 commit comments

Comments
 (0)