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
I recently upgraded to xarray 0.14.0. When running code that used to work in 0.13, I get a TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe'' in 0.14 when running code similar to the MCVE below. The code should return the GroupBy bins instead of the error.
~/miniconda3/lib/python3.7/site-packages/xarray/core/groupby.py in init(self, obj, group, squeeze, grouper, bins, restore_coord_dims, cut_kwargs)
322
323 if bins is not None:
--> 324 if np.isnan(bins).all():
325 raise ValueError("All bin edges are NaN.")
326 binned = pd.cut(group.values, bins, **cut_kwargs)
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
I recently upgraded to xarray 0.14.0. When running code that used to work in 0.13, I get a
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
in 0.14 when running code similar to the MCVE below. The code should return the GroupBy bins instead of the error.MCVE Code Sample
Full error details below.
~/miniconda3/lib/python3.7/site-packages/xarray/core/common.py in groupby_bins(self, group, bins, right, labels, precision, include_lowest, squeeze, restore_coord_dims)
727 "labels": labels,
728 "precision": precision,
--> 729 "include_lowest": include_lowest,
730 },
731 )
~/miniconda3/lib/python3.7/site-packages/xarray/core/groupby.py in init(self, obj, group, squeeze, grouper, bins, restore_coord_dims, cut_kwargs)
322
323 if bins is not None:
--> 324 if np.isnan(bins).all():
325 raise ValueError("All bin edges are NaN.")
326 binned = pd.cut(group.values, bins, **cut_kwargs)
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
Output of
xr.show_versions()
INSTALLED VERSIONS
commit: None
libhdf5: 1.10.4
libnetcdf: 4.6.2
xarray: 0.14.0
pandas: 0.25.1
numpy: 1.17.2
scipy: 1.3.0
netCDF4: 1.5.1.2
pydap: installed
h5netcdf: None
h5py: None
Nio: None
zarr: None
cftime: 1.0.3.4
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: None
dask: 2.2.0
distributed: 2.5.2
matplotlib: 3.1.1
cartopy: 0.17.0
seaborn: 0.9.0
numbagg: None
setuptools: 41.4.0
pip: 19.3
conda: 4.7.12
pytest: 5.1.1
IPython: 7.8.0
sphinx: None
The text was updated successfully, but these errors were encountered: