Skip to content

Commit

Permalink
Merge branch 'main' into numbagg-ddof
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty authored Jan 22, 2024
2 parents fab263c + d6deb46 commit f9ed476
Show file tree
Hide file tree
Showing 6 changed files with 148 additions and 143 deletions.
13 changes: 9 additions & 4 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7270,11 +7270,16 @@ Breaking changes
- The ``season`` datetime shortcut now returns an array of string labels
such `'DJF'`:

.. ipython:: python
:okwarning:
.. code-block:: ipython
ds = xray.Dataset({"t": pd.date_range("2000-01-01", periods=12, freq="M")})
ds["t.season"]
In[92]: ds = xray.Dataset({"t": pd.date_range("2000-01-01", periods=12, freq="M")})
In[93]: ds["t.season"]
Out[93]:
<xarray.DataArray 'season' (t: 12)>
array(['DJF', 'DJF', 'MAM', ..., 'SON', 'SON', 'DJF'], dtype='<U3')
Coordinates:
* t (t) datetime64[ns] 2000-01-31 2000-02-29 ... 2000-11-30 2000-12-31
Previously, it returned numbered seasons 1 through 4.
- We have updated our use of the terms of "coordinates" and "variables". What
Expand Down
2 changes: 1 addition & 1 deletion xarray/backends/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,7 @@ def save_mfdataset(
>>> ds = xr.Dataset(
... {"a": ("time", np.linspace(0, 1, 48))},
... coords={"time": pd.date_range("2010-01-01", freq="M", periods=48)},
... coords={"time": pd.date_range("2010-01-01", freq="ME", periods=48)},
... )
>>> ds
<xarray.Dataset>
Expand Down
Loading

0 comments on commit f9ed476

Please sign in to comment.