Skip to content

Support first, last with dask arrays #7562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 3, 2023
Merged

Conversation

dcherian
Copy link
Contributor

Use dask.array.reduction. For this we need to add support for the keepdims kwarg to nanfirst and nanlast. Even though the final result is always keepdims=False, dask runs the intermediate steps with keepdims=True.

  • Closes #xxxx
  • Tests added
  • User visible changes (including notable bug fixes) are documented in whats-new.rst

Use dask.array.reduction. For this we need to add support
for the `keepdims` kwarg to `nanfirst` and `nanlast`.
Even though the final result is always keepdims=False,
dask runs the intermediate steps with keepdims=True.
@dcherian dcherian added the topic-arrays related to flexible array support label Feb 27, 2023
@dcherian dcherian requested a review from TomNicholas February 27, 2023 04:54
It would need to account for shape change.
@dcherian dcherian added the plan to merge Final call for comments label Mar 1, 2023
@dcherian dcherian merged commit 830ee6d into pydata:main Mar 3, 2023
@dcherian dcherian deleted the dask-first-last branch March 3, 2023 23:13
dcherian added a commit to dcherian/xarray that referenced this pull request Mar 9, 2023
* main:
  Preserve `base` and `loffset` arguments in `resample` (pydata#7444)
  ignore the `pkg_resources` deprecation warning (pydata#7594)
  Update contains_cftime_datetimes to avoid loading entire variable array (pydata#7494)
  Support first, last with dask arrays (pydata#7562)
  update the docs environment (pydata#7442)
  Add xCDAT to list of Xarray related projects (pydata#7579)
  [pre-commit.ci] pre-commit autoupdate (pydata#7565)
  fix nczarr when libnetcdf>4.8.1 (pydata#7575)
  use numpys SupportsDtype (pydata#7521)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plan to merge Final call for comments topic-arrays related to flexible array support topic-dask
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants