Skip to content

Commit

Permalink
Merge pull request JiaweiZhuang#103 from slevang/xr_ufunc_args
Browse files Browse the repository at this point in the history
FutureWarning in apply_ufunc
  • Loading branch information
huard committed Aug 12, 2021
2 parents 089e0e9 + 5e473b6 commit 6cad2ee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
else:
INSTALL_REQUIRES = [
'esmpy>=8.0.0',
'xarray!=0.16.1',
'xarray>=0.16.2',
'numpy>=1.16',
'scipy',
'shapely',
Expand Down
16 changes: 10 additions & 6 deletions xesmf/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,11 @@ def regrid_dataarray(self, dr_in, keep_attrs=False, skipna=False, na_thres=1.0):
output_core_dims=[temp_horiz_dims],
dask='parallelized',
output_dtypes=[float],
output_sizes={
temp_horiz_dims[0]: self.shape_out[0],
temp_horiz_dims[1]: self.shape_out[1],
dask_gufunc_kwargs={
'output_sizes': {
temp_horiz_dims[0]: self.shape_out[0],
temp_horiz_dims[1]: self.shape_out[1],
},
},
keep_attrs=keep_attrs,
)
Expand Down Expand Up @@ -560,9 +562,11 @@ def regrid_dataset(self, ds_in, keep_attrs=False, skipna=False, na_thres=1.0):
output_core_dims=[temp_horiz_dims],
dask='parallelized',
output_dtypes=[float],
output_sizes={
temp_horiz_dims[0]: self.shape_out[0],
temp_horiz_dims[1]: self.shape_out[1],
dask_gufunc_kwargs={
'output_sizes': {
temp_horiz_dims[0]: self.shape_out[0],
temp_horiz_dims[1]: self.shape_out[1],
},
},
keep_attrs=keep_attrs,
)
Expand Down

0 comments on commit 6cad2ee

Please sign in to comment.