You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bottleneck's aggregation functions like bottleneck.nansum() don't have a dtype argument, so passing on a dtype argument causes an error to be raised.
If you call a numpy function like numpy.sum() on an xarray object, it calls the appropriate method with all keyword arguments, e.g., numpy.sum(xarray_obj) -> xarray_obj.sum(axis=None, dtype=None, out=None).
What we should probably do here instead of ignoring dtype and out entirely is to look at their values:
If dtype is not None, use numpy's aggregation function instead of bottleneck's.
Code Sample, a copy-pastable example if possible
Problem description
The result is int64. This is a problem because I asked for int32.
Expected Output
Expected output
int32
.Output of
xr.show_versions()
xarray: 0.10.0+dev12.gf882a58
pandas: 0.22.0
numpy: 1.14.0
scipy: 1.0.0
netCDF4: 1.3.1
h5netcdf: None
Nio: None
bottleneck: 1.2.1
cyordereddict: None
dask: 0.16.1
matplotlib: 2.1.1
cartopy: 0.15.1
seaborn: 0.8.1
setuptools: 38.4.0
pip: 9.0.1
conda: 4.3.16
pytest: 3.1.2
IPython: 6.1.0
sphinx: 1.6.2
The text was updated successfully, but these errors were encountered: