Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky committed Aug 26, 2021
1 parent b3a67e3 commit daf8af1
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions doc/user-guide/dask.rst
Original file line number Diff line number Diff line change
Expand Up @@ -259,18 +259,16 @@ along a particular dimension, an exception is raised when you try to access
arrays in a dataset share the same chunking alignment. Neither of these
are currently done.

NumPy ufuncs like ``np.sin`` currently only work on eagerly evaluated arrays
(this will change with the next major NumPy release). We have provided
replacements that also work on all xarray objects, including those that store
lazy Dask arrays, in the :ref:`xarray.ufuncs <api.ufuncs>` module:
NumPy ufuncs like ``np.sin`` transparently work on all xarray objects, including those that store
lazy Dask arrays:

.. ipython:: python
import xarray.ufuncs as xu
import numpy as np
xu.sin(rechunked)
np.sin(rechunked)
To access Dask arrays directly, use the new
To access Dask arrays directly, use the
:py:attr:`DataArray.data <xarray.DataArray.data>` attribute. This attribute exposes
array data either as a Dask array or as a NumPy array, depending on whether it has been
loaded into Dask or not:
Expand All @@ -281,8 +279,8 @@ loaded into Dask or not:
.. note::

In the future, we may extend ``.data`` to support other "computable" array
backends beyond Dask and NumPy (e.g., to support sparse arrays).
``.data`` is also used to expose other "computable" array backends beyond Dask and
NumPy (e.g. sparse and pint arrays).

.. _dask.automatic-parallelization:

Expand Down

0 comments on commit daf8af1

Please sign in to comment.