Skip to content
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

Bump versions #5258

Merged
merged 4 commits into from
May 5, 2021
Merged

Bump versions #5258

merged 4 commits into from
May 5, 2021

Conversation

keewis
Copy link
Collaborator

@keewis keewis commented May 4, 2021

As requested in #5232 (comment), this bumps the dependencies. There's a warning for netcdf4: it uses the 1.major.minor scheme, so we pinned it to 1.5.3 due to #4491. To remove that warning (and get automatic notifications for netcdf4 again) we'll have to update the min_deps_check script.

  • Passes pre-commit run --all-files
  • User visible changes (including notable bug fixes) are documented in whats-new.rst

@keewis keewis mentioned this pull request May 4, 2021
13 tasks
@dcherian
Copy link
Contributor

dcherian commented May 4, 2021

Thanks @keewis !

Could delete

if LooseVersion(dask_version) > LooseVersion("2.9.0"):
nanmedian = da.nanmedian
else:
def nanmedian(a, axis=None, keepdims=False):
"""
This works by automatically chunking the reduced axes to a single chunk
and then calling ``numpy.nanmedian`` function across the remaining dimensions
"""
if axis is None:
raise NotImplementedError(
"The da.nanmedian function only works along an axis. "
"The full algorithm is difficult to do in parallel"
)
if not isinstance(axis, Iterable):
axis = (axis,)
axis = [ax + a.ndim if ax < 0 else ax for ax in axis]
a = a.rechunk({ax: -1 if ax in axis else "auto" for ax in range(a.ndim)})
result = da.map_blocks(
np.nanmedian,
a,
axis=axis,
keepdims=keepdims,
drop_axis=axis if not keepdims else None,
chunks=[1 if ax in axis else c for ax, c in enumerate(a.chunks)]
if keepdims
else None,
)
return result

There's also a @requires_cftime_1_1_0 decorator in the tests that could be cleaned up if you want.

@keewis
Copy link
Collaborator Author

keewis commented May 4, 2021

done

Copy link
Contributor

@dcherian dcherian left a comment

Choose a reason for hiding this comment

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

Thanks @keewis

Copy link
Collaborator

@alexamici alexamici left a comment

Choose a reason for hiding this comment

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

LGTM as well, shall we merge it right away?

@alexamici
Copy link
Collaborator

@dcherian with dask>=2.15 you can update #4740 that looks mergiable as well, right?

@dcherian
Copy link
Contributor

dcherian commented May 5, 2021

with dask>=2.15

It doesn't work on 2.15, I checked; but we can merge anyway

@dcherian dcherian merged commit 8101b8d into pydata:master May 5, 2021
@keewis keewis deleted the bump-versions branch May 5, 2021 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants