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

Add map_blocks example to docs #3667

Merged
merged 1 commit into from
Jan 8, 2020
Merged

Add map_blocks example to docs #3667

merged 1 commit into from
Jan 8, 2020

Conversation

bradyrx
Copy link
Contributor

@bradyrx bradyrx commented Jan 7, 2020

This PR adds an example to the xr.map_blocks() docs.

It is modeled off of @rabernat's example here: https://nbviewer.jupyter.org/gist/rabernat/30e7b747f0e3583b5b776e4093266114 and was encouraged to be opened via the gitter.

It might be slightly large for an example, but I think it shows an applied case to use this in and clears up some common pitfalls (e.g. how to pass args/kwargs).

@bradyrx
Copy link
Contributor Author

bradyrx commented Jan 8, 2020

What's going on here? I use travis on my repos so I'm not familiar with the Azure setup. I only modified a docstring so I'm not sure why it would break the testing suite? Unless it's testing my code snippet in the docs?

@keewis
Copy link
Collaborator

keewis commented Jan 8, 2020

We use the upstream-dev check as a early warning system for changes in the unreleased versions of xarray's dependencies. It being the only failure usually means upstream (I guess pandas in this case) changed something, breaking some of xarray's tests.

Since this also happens in other PRs and is completely unrelated (I think we don't run doctest in CI), I'd say you can safely ignore the failure.

@dcherian
Copy link
Contributor

dcherian commented Jan 8, 2020

Thanks @bradyrx

@dcherian dcherian merged commit 8fc9ece into pydata:master Jan 8, 2020
@bradyrx bradyrx deleted the add_map_blocks_example branch January 9, 2020 18:21
@bradyrx
Copy link
Contributor Author

bradyrx commented Jan 9, 2020

Oops, forgot to add to whats-new, but this is a pretty minor addition.

@dcherian
Copy link
Contributor

dcherian commented Jan 9, 2020

Send in a new PR with an entry! We have a documentation section...

@bradyrx
Copy link
Contributor Author

bradyrx commented Jan 10, 2020

Thanks @dcherian -- done in #3682.

dcherian added a commit to dcherian/xarray that referenced this pull request Jan 14, 2020
* upstream/master:
  allow passing any iterable to drop when dropping variables (pydata#3693)
  Typo on DataSet/DataArray.to_dict documentation (pydata#3692)
  Fix mypy type checking tests failure in ds.merge (pydata#3690)
  Explicitly convert result of pd.to_datetime to a timezone-naive type (pydata#3688)
  ds.merge(da) bugfix (pydata#3677)
  fix docstring for combine_first: returns a Dataset (pydata#3683)
  Add option to choose mfdataset attributes source. (pydata#3498)
  How do I add a new variable to dataset. (pydata#3679)
  Add map_blocks example to whats-new (pydata#3682)
  Make dask names change when chunking Variables by different amounts. (pydata#3584)
  raise an error when renaming dimensions to existing names (pydata#3645)
  Support swap_dims to dimension names that are not existing variables (pydata#3636)
  Add map_blocks example to docs. (pydata#3667)
  add multiindex level name checking to .rename() (pydata#3658)
dcherian added a commit to dcherian/xarray that referenced this pull request Jan 15, 2020
* upstream/master:
  Add an example notebook using apply_ufunc to vectorize 1D functions (pydata#3629)
  Use encoding['dtype'] over data.dtype when possible within CFMaskCoder.encode (pydata#3652)
  allow passing any iterable to drop when dropping variables (pydata#3693)
  Typo on DataSet/DataArray.to_dict documentation (pydata#3692)
  Fix mypy type checking tests failure in ds.merge (pydata#3690)
  Explicitly convert result of pd.to_datetime to a timezone-naive type (pydata#3688)
  ds.merge(da) bugfix (pydata#3677)
  fix docstring for combine_first: returns a Dataset (pydata#3683)
  Add option to choose mfdataset attributes source. (pydata#3498)
  How do I add a new variable to dataset. (pydata#3679)
  Add map_blocks example to whats-new (pydata#3682)
  Make dask names change when chunking Variables by different amounts. (pydata#3584)
  raise an error when renaming dimensions to existing names (pydata#3645)
  Support swap_dims to dimension names that are not existing variables (pydata#3636)
  Add map_blocks example to docs. (pydata#3667)
  add multiindex level name checking to .rename() (pydata#3658)
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