Skip to content

Commit

Permalink
DOC: remove example using Dataset.T (#2572)
Browse files Browse the repository at this point in the history
* DOC: remove example using Dataset.T

* Update reshaping.rst

* Update reshaping.rst
  • Loading branch information
shoyer authored and dcherian committed Nov 26, 2018
1 parent ecbf91f commit a2a448d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions doc/reshaping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ Reordering dimensions
---------------------

To reorder dimensions on a :py:class:`~xarray.DataArray` or across all variables
on a :py:class:`~xarray.Dataset`, use :py:meth:`~xarray.DataArray.transpose` or the
``.T`` property:
on a :py:class:`~xarray.Dataset`, use :py:meth:`~xarray.DataArray.transpose`:

.. ipython:: python
ds = xr.Dataset({'foo': (('x', 'y', 'z'), [[[42]]]), 'bar': (('y', 'z'), [[24]])})
ds.transpose('y', 'z', 'x')
ds.T
ds.transpose() # reverses all dimensions
Expand and squeeze dimensions
-----------------------------
Expand Down

0 comments on commit a2a448d

Please sign in to comment.