WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 18fe837

Browse files
committed
Standartize the strides when checking numpy and dpnp arrays
1 parent af34900 commit 18fe837

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dpnp/tests/third_party/cupy/testing/_array.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,11 @@ def assert_array_equal(
171171
)
172172

173173
if strides_check:
174-
strides = tuple(el // desired.itemsize for el in desired.strides)
174+
strides = desired.strides
175+
if isinstance(actual, cupy.ndarray):
176+
# need to agreed the strides with numpy.ndarray
177+
strides = tuple(el // desired.itemsize for el in desired.strides)
178+
175179
if actual.strides != strides:
176180
msg = ["Strides are not equal:"]
177181
if err_msg:

0 commit comments

Comments
 (0)