Skip to content

Commit 3478aba

Browse files
author
Diptorup Deb
authored
Merge pull request #987 from IntelPython/dpnp_overload_fix
Fixed layout in dpnp overload.
2 parents de2a895 + 125585a commit 3478aba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

numba_dpex/dpnp_iface/arrayobj.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ def ol_dpnp_zeros(
326326
"""
327327

328328
_ndim = _ty_parse_shape(shape)
329+
_layout = _parse_layout(order)
329330
_dtype = _parse_dtype(dtype)
330331
_usm_type = _parse_usm_type(usm_type) if usm_type is not None else "device"
331332
_device = (
@@ -334,7 +335,7 @@ def ol_dpnp_zeros(
334335
if _ndim:
335336
ret_ty = build_dpnp_ndarray(
336337
_ndim,
337-
layout=order,
338+
layout=_layout,
338339
dtype=_dtype,
339340
usm_type=_usm_type,
340341
device=_device,
@@ -407,14 +408,15 @@ def ol_dpnp_ones(
407408

408409
_ndim = _ty_parse_shape(shape)
409410
_dtype = _parse_dtype(dtype)
411+
_layout = _parse_layout(order)
410412
_usm_type = _parse_usm_type(usm_type) if usm_type is not None else "device"
411413
_device = (
412414
_parse_device_filter_string(device) if device is not None else "unknown"
413415
)
414416
if _ndim:
415417
ret_ty = build_dpnp_ndarray(
416418
_ndim,
417-
layout=order,
419+
layout=_layout,
418420
dtype=_dtype,
419421
usm_type=_usm_type,
420422
device=_device,

0 commit comments

Comments
 (0)