Closed ndgrigorian closed 1 year ago
Seems to only afflict double precision floating point numbers. CPU is the only device that supports float64 on my system:
In [7]: dpt.full(10, fill_value=dpt.nan, device='cpu', dtype=dpt.float64)
Out[7]: usm_ndarray([-1., -1., -1., -1., -1., -1., -1., -1., -1., -1.])
In [8]: dpt.full(10, fill_value=dpt.nan, device='cpu', dtype=dpt.float32)
Out[8]: usm_ndarray([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan], dtype=float32)
In [9]: dpt.full(10, fill_value=dpt.nan)
Out[9]: usm_ndarray([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan], dtype=float32)
When calling
full
orfull_like
withfill_value=dpt.nan
orfill_value=np.nan
, an array filled with-1.
is returned instead.See here:
Notably, the following works: