Skip to content

Commit

Permalink
Import dpnp_array directly
Browse files Browse the repository at this point in the history
  • Loading branch information
ndgrigorian committed Sep 17, 2024
1 parent 39ac075 commit b8dad1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dpnp/dpnp_algo/dpnp_fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from dpctl.utils import SequentialOrderManager

import dpnp
from dpnp.dpnp_array import dpnp_array


def dpnp_fill(arr, val):
Expand All @@ -43,7 +44,7 @@ def dpnp_fill(arr, val):

dpnp.check_supported_arrays_type(val, scalar_type=True, all_scalars=True)
# if val is an array, process it
if isinstance(val, (dpnp.dpnp_array, dpt.usm_ndarray)):
if isinstance(val, (dpnp_array, dpt.usm_ndarray)):
val = dpnp.get_usm_ndarray(val)
if val.shape != ():
raise ValueError("`val` must be a scalar")
Expand Down

0 comments on commit b8dad1e

Please sign in to comment.