Skip to content

Commit 8abe469

Browse files
committed
Add another concat example
1 parent 2013ca7 commit 8abe469

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/tutorial.rst

+8
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,14 @@ To combine arrays along a dimension into a larger arrays, you can use the
656656
xray.Dataset.concat([ds.sel(time='2000-01-01'), ds.sel(time='2000-01-03')],
657657
'new_dim')
658658
659+
The second argument to ``concat`` can be :py:class:`~xray.Coordinate` or
660+
:py:class:`~xray.DataArray` object as well as a string, in which case it is
661+
used to label the values along the new dimension:
662+
663+
.. ipython:: python
664+
665+
xray.DataArray.concat([foo[0], foo[1]], xray.Coordinate('x', [-90, -100]))
666+
659667
:py:meth:`Dataset.concat <xray.Dataset.concat>` has a number of options which
660668
control how it combines data, and in particular, how it handles conflicting
661669
variables between datasets.

0 commit comments

Comments
 (0)