File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,17 @@ def _resize_ndarray(
1717 arr : np .ndarray ,
1818 new_shape : tuple | list | np .ndarray ,
1919) -> np .ndarray :
20+ """
21+ Resizes a `numpy.ndarray` to another shape. The returned array must have the
22+ same dimensionality as the input array.
23+
24+ Parameters
25+ ----------
26+ arr
27+ The input array.
28+ new_shape
29+ The shape of the new `xarray.DataArray`, must be the same length as arr.shape.
30+ """
2031
2132 from scipy .interpolate import RegularGridInterpolator # noqa: PLC0415
2233
@@ -100,6 +111,15 @@ def resize(
100111 self ,
101112 new_shape : tuple | list | np .ndarray ,
102113 ) -> xr .DataArray :
114+ """
115+ Resizes a `xarray.DataArray` to another shape. The returned array must have the
116+ same dimensionality as the input array.
117+
118+ Parameters
119+ ----------
120+ new_shape
121+ The shape of the new `xarray.DataArray`, must be the same length as self.shape.
122+ """
103123
104124 da = self ._obj
105125 # Create a copy of the existing dataarray so that we can copy over the
You can’t perform that action at this time.
0 commit comments