Skip to content

Commit

Permalink
Merge pull request #987 from IntelPython/dpnp_overload_fix
Browse files Browse the repository at this point in the history
Fixed layout in dpnp overload.
  • Loading branch information
Diptorup Deb authored Mar 31, 2023
2 parents de2a895 + 125585a commit 3478aba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions numba_dpex/dpnp_iface/arrayobj.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ def ol_dpnp_zeros(
"""

_ndim = _ty_parse_shape(shape)
_layout = _parse_layout(order)
_dtype = _parse_dtype(dtype)
_usm_type = _parse_usm_type(usm_type) if usm_type is not None else "device"
_device = (
Expand All @@ -334,7 +335,7 @@ def ol_dpnp_zeros(
if _ndim:
ret_ty = build_dpnp_ndarray(
_ndim,
layout=order,
layout=_layout,
dtype=_dtype,
usm_type=_usm_type,
device=_device,
Expand Down Expand Up @@ -407,14 +408,15 @@ def ol_dpnp_ones(

_ndim = _ty_parse_shape(shape)
_dtype = _parse_dtype(dtype)
_layout = _parse_layout(order)
_usm_type = _parse_usm_type(usm_type) if usm_type is not None else "device"
_device = (
_parse_device_filter_string(device) if device is not None else "unknown"
)
if _ndim:
ret_ty = build_dpnp_ndarray(
_ndim,
layout=order,
layout=_layout,
dtype=_dtype,
usm_type=_usm_type,
device=_device,
Expand Down

0 comments on commit 3478aba

Please sign in to comment.