Skip to content

Commit 5bcf9ba

Browse files
vtavanaantonwolfy
andauthored
update dpctl function signature (#1775)
* update func signature * Use positional argument in validate_usm_type() call --------- Co-authored-by: Anton Volkov <[email protected]>
1 parent 5a3e078 commit 5bcf9ba

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

dpnp/dpnp_container.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,13 +301,13 @@ def ones(
301301

302302
def tril(x1, /, *, k=0):
303303
"""Creates `dpnp_array` as lower triangular part of an input array."""
304-
array_obj = dpt.tril(dpnp.get_usm_ndarray(x1), k)
304+
array_obj = dpt.tril(dpnp.get_usm_ndarray(x1), k=k)
305305
return dpnp_array(array_obj.shape, buffer=array_obj, order="K")
306306

307307

308308
def triu(x1, /, *, k=0):
309309
"""Creates `dpnp_array` as upper triangular part of an input array."""
310-
array_obj = dpt.triu(dpnp.get_usm_ndarray(x1), k)
310+
array_obj = dpt.triu(dpnp.get_usm_ndarray(x1), k=k)
311311
return dpnp_array(array_obj.shape, buffer=array_obj, order="K")
312312

313313

dpnp/dpnp_iface_manipulation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ def can_cast(from_, to, casting="safe"):
531531
if dpnp.is_supported_array_type(from_)
532532
else dpnp.dtype(from_)
533533
)
534-
return dpt.can_cast(dtype_from, to, casting)
534+
return dpt.can_cast(dtype_from, to, casting=casting)
535535

536536

537537
def column_stack(tup):

dpnp/random/dpnp_random_state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def normal(
257257
f"scale={scale}, but must be non-negative."
258258
)
259259

260-
dpu.validate_usm_type(usm_type=usm_type, allow_none=False)
260+
dpu.validate_usm_type(usm_type, allow_none=False)
261261
return self._random_state.normal(
262262
loc=loc,
263263
scale=scale,

0 commit comments

Comments
 (0)