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.bool
dpnp_fill
isinstance
1 parent 865867a commit 4ba7186Copy full SHA for 4ba7186
dpnp/dpnp_algo/dpnp_fill.py
@@ -28,7 +28,6 @@
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,
@@ -61,7 +60,7 @@ def dpnp_fill(arr, val):
61
60
)
62
_manager.add_event_pair(h_ev, c_ev)
63
return
64
- elif not isinstance(val, Number) and not isinstance(val, np.bool_):
+ elif not isinstance(val, (Number, dpnp.bool)):
65
raise TypeError(
66
f"array cannot be filled with `val` of type {type(val)}"
67
0 commit comments