Expand dimensions xarray
问题 Is there an existing method or approach to expand the dimensions (and coordinates) of an xarray.DataArray object? I would like to obtain something similar to np.expand_dims while at the same time defining a new dimension and coordinate variable for the new expanded DataArray . Using DataArray.assign_coords() I can create a new coordinate variable but the array itself is not expanded with a new axis. 回答1: In xarray v0.10.0, I use a combination of assign_coords() and expand_dims() to add a new