Skip to content

Conversation

GuruprashanthKrishnakumar

counts = ensure_int64(counts).cumsum()
_result = (r[start:end] for start, end in zip(counts, counts[1:]))
return dict(zip(categories, _result))
_result = (r[start:end] for start, end in zip(counts, counts[1:], strict=False))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use itertools.pairwise here?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Could you re-review?

@mroeschke mroeschke added the Code Style Code style, linting, code_checks label Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants