Skip to content

Commit b626a14

Browse files
committed
Consider buffer offset when creating a view on ndarray
1 parent 9218f1c commit b626a14

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

dpnp/dpnp_array.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def __init__(
9898
# or as USM memory allocation
9999
if isinstance(buffer, dpnp_array):
100100
buffer = buffer.get_array()
101+
offset += buffer._element_offset
101102

102103
if dtype is None and hasattr(buffer, "dtype"):
103104
dtype = buffer.dtype

0 commit comments

Comments
 (0)