Skip to content

Commit b0d8d93

Browse files
authored
fix doc dataarray to netcdf (#4424)
* fix doc dataarray to netcdf * codeblock
1 parent 59f57f3 commit b0d8d93

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

xarray/core/dataarray.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -2490,15 +2490,19 @@ def to_masked_array(self, copy: bool = True) -> np.ma.MaskedArray:
24902490
def to_netcdf(self, *args, **kwargs) -> Union[bytes, "Delayed", None]:
24912491
"""Write DataArray contents to a netCDF file.
24922492
2493-
All parameters are passed directly to `xarray.Dataset.to_netcdf`.
2493+
All parameters are passed directly to :py:meth:`xarray.Dataset.to_netcdf`.
24942494
24952495
Notes
24962496
-----
24972497
Only xarray.Dataset objects can be written to netCDF files, so
24982498
the xarray.DataArray is converted to a xarray.Dataset object
24992499
containing a single variable. If the DataArray has no name, or if the
2500-
name is the same as a co-ordinate name, then it is given the name
2501-
'__xarray_dataarray_variable__'.
2500+
name is the same as a coordinate name, then it is given the name
2501+
``"__xarray_dataarray_variable__"``.
2502+
2503+
See Also
2504+
--------
2505+
Dataset.to_netcdf
25022506
"""
25032507
from ..backends.api import DATAARRAY_NAME, DATAARRAY_VARIABLE
25042508

0 commit comments

Comments
 (0)