Value Error In Multiplying Xarray Variable With 2d Numpy Array
import xarray as xr xr.open_dataset(path_netcdf, chunks={'time': 10}) flow_data = hndl_tran['val'] new_arr = flow_data * vba I get this error: *** ValueError: total size of new ar
Solution 1:
Make your numpy into an xarray
object before you do the multiplication:
flow_data = xr.DataArray(hndl_tran['val'])
or vice versa
flow_data = np.array(flow_data)
Post a Comment for "Value Error In Multiplying Xarray Variable With 2d Numpy Array"