We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
dpnp_fill
1 parent bd30f85 commit 001520eCopy full SHA for 001520e
dpnp/dpnp_algo/dpnp_fill.py
@@ -28,6 +28,7 @@
28
29
import dpctl.tensor as dpt
30
import dpctl.utils as dpu
31
+import numpy as np
32
from dpctl.tensor._ctors import _cast_fill_val
33
from dpctl.tensor._tensor_impl import (
34
_copy_usm_ndarray_into_usm_ndarray,
@@ -60,7 +61,7 @@ def dpnp_fill(arr, val):
60
61
)
62
_manager.add_event_pair(h_ev, c_ev)
63
return
- elif not isinstance(val, Number):
64
+ elif not isinstance(val, Number) and not isinstance(val, np.bool_):
65
raise TypeError(
66
f"Array cannot be filled with `val` of type {type(val)}"
67
0 commit comments