Skip to content

Commit e000262

Browse files
committed
Fixed bug with new mapping function
1 parent 2fe0dea commit e000262

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

hdp/measure.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def heat_index_map_wrapper(ds):
101101
dask="parallelized",
102102
input_core_dims=[[], []],
103103
output_core_dims=[[]],
104-
output_dtypes=[float],
104+
output_dtypes=[np.float32],
105105
dask_gufunc_kwargs={
106106
'allow_rechunk': False
107107
})
@@ -121,13 +121,11 @@ def apply_heat_index(temp: xarray.DataArray, rh: xarray.DataArray) -> xarray.Dat
121121
"""
122122
assert temp.attrs["units"] == "degF"
123123
assert rh.attrs["units"] == "%"
124-
hi_da = xarray.map_blocks(
125-
heat_index_map_wrapper,
124+
hi_da = heat_index_map_wrapper(
126125
xarray.Dataset({
127126
"temp": temp,
128127
"rh": rh
129128
}),
130-
template=temp
131129
)
132130
hi_da = hi_da.rename(f"{temp.name}_hi")
133131
hi_da.attrs["baseline_variable"] = hi_da.name

0 commit comments

Comments
 (0)