home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 1421065459

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
1421065459 PR_kwDOAMm_X85BbUp9 7206 Save groupby codes after factorizing, pass to flox 2448579 closed 0     2 2022-10-24T16:00:35Z 2023-03-30T04:36:40Z 2023-03-29T16:28:28Z MEMBER   0 pydata/xarray/pulls/7206
  • [x] Closes #6689,
  • xref #6610
  • [x] Closes #7601
  • [x] Tests added

This is an alternative to #6689. - There I tried to avoid factorizing in the GroupBy constructor, and passed the by variable directly to flox. Most GroupBy methods however depend on various steps in __init__, so it became messy. - Here I instead preserve factorizing in the constructor and pass the factorized codes to flox. This simplifies things a lot. Since we'll want to preserve the "for loop over groups" approach for GroupBy.map, we'll need something like this anyway.

The large amount of deleted code in _flox_reduce here suggests to me that this is the better approach.

I think we could also use this to generalize to multiple groupers: - factorize each, - ravel_muti_index to generate a singe variable to groupby - apply - reshape to output shape - assign new indices.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/7206/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 pull

Links from other tables

  • 3 rows from issues_id in issues_labels
  • 2 rows from issue in issue_comments
Powered by Datasette · Queries took 0.684ms · About: xarray-datasette