Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion xarray/backends/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ class (a subclass of ``BackendEntrypoint``) can also be used.
All parameters are passed directly to `xarray.open_dataset`. See that
documentation for further details.

See also
See Also
--------
open_dataset
"""
Expand Down
2 changes: 1 addition & 1 deletion xarray/coding/cftime_offsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,7 @@ def date_range(
2000-07-01 00:00:00, 2000-09-01 00:00:00, 2000-11-01 00:00:00],
dtype='object', length=6, calendar='noleap', freq='2MS')

See also
See Also
--------
pandas.date_range
cftime_range
Expand Down
14 changes: 6 additions & 8 deletions xarray/computation/apply_ufunc.py
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,12 @@ def apply_ufunc(

Note that due to the overhead :py:func:`xarray.map_blocks` is considerably slower than ``apply_ufunc``.

:ref:`dask.automatic-parallelization`
User guide describing :py:func:`apply_ufunc` and :py:func:`map_blocks`.

:doc:`xarray-tutorial:advanced/apply_ufunc/apply_ufunc`
Advanced Tutorial on applying numpy function using :py:func:`apply_ufunc`

Examples
--------
Calculate the vector magnitude of two arguments:
Expand Down Expand Up @@ -1141,14 +1147,6 @@ def apply_ufunc(
dask.array.apply_gufunc
xarray.map_blocks

Notes
-----
:ref:`dask.automatic-parallelization`
User guide describing :py:func:`apply_ufunc` and :py:func:`map_blocks`.

:doc:`xarray-tutorial:advanced/apply_ufunc/apply_ufunc`
Advanced Tutorial on applying numpy function using :py:func:`apply_ufunc`

References
----------
.. [1] https://numpy.org/doc/stable/reference/ufuncs.html
Expand Down
24 changes: 12 additions & 12 deletions xarray/core/dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -3199,7 +3199,7 @@ def drop_vars(
New Dataset copied from `self` with variables removed.

Examples
-------
--------
>>> data = np.arange(12).reshape(4, 3)
>>> da = xr.DataArray(
... data=data,
Expand Down Expand Up @@ -3985,7 +3985,7 @@ def to_dataframe(
result: DataFrame
DataArray as a pandas DataFrame.

See also
See Also
--------
DataArray.to_pandas
DataArray.to_series
Expand Down Expand Up @@ -4028,7 +4028,7 @@ def to_series(self) -> pd.Series:
result : Series
DataArray as a pandas Series.

See also
See Also
--------
DataArray.to_pandas
DataArray.to_dataframe
Expand Down Expand Up @@ -4702,7 +4702,7 @@ def broadcast_equals(self, other: Self) -> bool:
DataArray to compare to.

Returns
----------
-------
equal : bool
True if the two DataArrays are broadcast equal.

Expand Down Expand Up @@ -4756,7 +4756,7 @@ def equals(self, other: Self) -> bool:
DataArray to compare to.

Returns
----------
-------
equal : bool
True if the two DataArrays are equal.

Expand Down Expand Up @@ -4812,7 +4812,7 @@ def identical(self, other: Self) -> bool:
DataArray to compare to.

Returns
----------
-------
equal : bool
True if the two DataArrays are identical.

Expand Down Expand Up @@ -5487,7 +5487,7 @@ def differentiate(
-------
differentiated: DataArray

See also
See Also
--------
numpy.gradient: corresponding numpy function

Expand Down Expand Up @@ -5545,7 +5545,7 @@ def integrate(
-------
integrated : DataArray

See also
See Also
--------
Dataset.integrate
numpy.trapz : corresponding numpy function
Expand Down Expand Up @@ -5602,7 +5602,7 @@ def cumulative_integrate(
-------
integrated : DataArray

See also
See Also
--------
Dataset.cumulative_integrate
scipy.integrate.cumulative_trapezoid : corresponding scipy function
Expand Down Expand Up @@ -6746,7 +6746,7 @@ def convert_calendar(
time part of the timestamps.

Parameters
---------
----------
calendar : str
The target calendar name.
dim : str
Expand Down Expand Up @@ -6867,8 +6867,8 @@ def interp_calendar(
dim : str
The time coordinate name.

Return
------
Returns
-------
DataArray
The source interpolated on the decimal years of target,
"""
Expand Down
26 changes: 13 additions & 13 deletions xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ def as_numpy(self) -> Self:
"""
Coerces wrapped data and coordinates into numpy arrays, returning a Dataset.

See also
See Also
--------
DataArray.as_numpy
DataArray.to_numpy : Returns only the data as a numpy.ndarray object.
Expand Down Expand Up @@ -1688,8 +1688,8 @@ def identical(self, other: Self) -> bool:
"""Like equals, but also checks all dataset attributes, the
attributes on all variables and coordinates, and indexes.

Example
-------
Examples
--------

>>> a = xr.Dataset(
... {"Width": ("X", [1, 2, 3])},
Expand Down Expand Up @@ -6558,7 +6558,7 @@ def interpolate_na(
interpolated: Dataset
Filled in Dataset.

Warning
Warnings
--------
When passing fill_value as a keyword argument with method="linear", it does not use
``numpy.interp`` but it uses ``scipy.interpolate.interp1d``, which provides the fill_value parameter.
Expand Down Expand Up @@ -7601,7 +7601,7 @@ def from_dict(cls, d: Mapping[Any, Any]) -> Self:
-------
obj : Dataset

See also
See Also
--------
Dataset.to_dict
DataArray.from_dict
Expand Down Expand Up @@ -8398,7 +8398,7 @@ def differentiate(
-------
differentiated: Dataset

See also
See Also
--------
numpy.gradient: corresponding numpy function
"""
Expand Down Expand Up @@ -8464,7 +8464,7 @@ def integrate(
-------
integrated : Dataset

See also
See Also
--------
DataArray.integrate
numpy.trapz : corresponding numpy function
Expand Down Expand Up @@ -8585,7 +8585,7 @@ def cumulative_integrate(
-------
integrated : Dataset

See also
See Also
--------
DataArray.cumulative_integrate
scipy.integrate.cumulative_trapezoid : corresponding scipy function
Expand Down Expand Up @@ -9592,8 +9592,8 @@ def eval(
result : Dataset or DataArray, depending on whether ``statement`` contains an
assignment.

Warning
-------
Warnings
--------
Like ``pd.eval()``, this method should not be used with untrusted input.

Examples
Expand Down Expand Up @@ -9933,7 +9933,7 @@ def convert_calendar(
time part of the timestamps.

Parameters
---------
----------
calendar : str
The target calendar name.
dim : Hashable, default: "time"
Expand Down Expand Up @@ -10054,8 +10054,8 @@ def interp_calendar(
dim : Hashable, default: "time"
The time coordinate name.

Return
------
Returns
-------
DataArray
The source interpolated on the decimal years of target,
"""
Expand Down
14 changes: 7 additions & 7 deletions xarray/core/datatree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ def from_dict(
-------
DataTree

See also
See Also
--------
Dataset

Expand Down Expand Up @@ -1428,7 +1428,7 @@ def to_dict(self, relative: bool = False) -> dict[str, Dataset]:
-------
dict[str, Dataset]

See also
See Also
--------
DataTree.subtree_with_keys
"""
Expand Down Expand Up @@ -1805,7 +1805,7 @@ def map_over_datasets(
subtrees : DataTree, tuple of DataTrees
One or more subtrees containing results from applying ``func`` to the data at each node.

See also
See Also
--------
map_over_datasets
"""
Expand Down Expand Up @@ -2052,8 +2052,8 @@ def to_netcdf(
* ``dask.delayed.Delayed`` if compute is False
* ``None`` otherwise

Note
----
Notes
-----
Due to file format specifications the on-disk root group name
is always ``"/"`` overriding any given ``DataTree`` root node name.
"""
Expand Down Expand Up @@ -2147,8 +2147,8 @@ def to_zarr(
kwargs :
Additional keyword arguments to be passed to ``xarray.Dataset.to_zarr``

Note
----
Notes
-----
Due to file format specifications the on-disk root group name
is always ``"/"`` overriding any given ``DataTree`` root node name.
"""
Expand Down
2 changes: 1 addition & 1 deletion xarray/core/datatree_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def map_over_datasets(
Result of applying `func` to each node in the provided trees, packed back
into DataTree objects via `DataTree.from_dict`.

See also
See Also
--------
DataTree.map_over_datasets
group_subtrees
Expand Down
2 changes: 1 addition & 1 deletion xarray/core/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def get_options():
Get options for xarray.

See Also
----------
--------
set_options

"""
Expand Down
2 changes: 1 addition & 1 deletion xarray/core/treenode.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ def group_subtrees(
TreeIsomorphismError
If trees are not isomorphic, i.e., they have different structures.

See also
See Also
--------
DataTree.subtree
DataTree.subtree_with_keys
Expand Down
2 changes: 1 addition & 1 deletion xarray/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def did_you_mean(
>>> did_you_mean("none", ("blech", "gray_r", 1, None, (2, 56)))
'Did you mean one of (None,)?'

See also
See Also
--------
https://en.wikipedia.org/wiki/String_metric
"""
Expand Down
2 changes: 1 addition & 1 deletion xarray/namedarray/parallelcompat.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ def scan(
-------
Chunked array

See also
See Also
--------
dask.array.cumreduction
"""
Expand Down
4 changes: 2 additions & 2 deletions xarray/structure/combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ def combine_nested(
temperature (t) float64 80B -0.8878 -1.981 -0.3479 ... -0.4381 -1.253
precipitation (t) float64 80B 1.202 -0.3873 -0.3023 ... -0.8955 0.3869

See also
See Also
--------
concat
merge
Expand Down Expand Up @@ -925,7 +925,7 @@ def combine_by_coords(
Will return a Dataset unless all the inputs are unnamed DataArrays, in which case a
DataArray will be returned.

See also
See Also
--------
concat
merge
Expand Down
2 changes: 1 addition & 1 deletion xarray/structure/concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def concat(
-------
concatenated : type of objs

See also
See Also
--------
merge

Expand Down
2 changes: 1 addition & 1 deletion xarray/structure/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ def merge(
xarray.MergeError
If any variables with the same name have conflicting values.

See also
See Also
--------
concat
combine_nested
Expand Down
Loading