Skip to content

Commit 2c181f8

Browse files
committed
Add workaround to prevent object array
Add a workaround for pydata/xarray#1792 --- the mask was accidentally being turned into an object dtype array.
1 parent fdcfe39 commit 2c181f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fogpy/composites.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,9 @@ def _convert_to_xr(projectables, fls, mask):
276276
"start_time", "end_time", "area", "resolution")}
277277

278278
xrfls = xarray.DataArray(
279-
fls, dims=dims, coords=coords, attrs=attrs)
279+
fls.data, dims=dims, coords=coords, attrs=attrs)
280280
xrmsk = xarray.DataArray(
281-
mask, dims=dims, coords=coords, attrs=attrs)
281+
mask.data, dims=dims, coords=coords, attrs=attrs)
282282

283283
return (xrfls, xrmsk)
284284

0 commit comments

Comments
 (0)