Skip to content

Commit ad563c0

Browse files
author
Vahid Tavanashad
committed
fix for order='a'
1 parent 61673f9 commit ad563c0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dpnp/dpnp_utils/dpnp_utils_einsum.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,8 +1034,8 @@ def dpnp_einsum(
10341034
)
10351035
arrays.append(operands[id])
10361036
result_dtype = dpnp.result_type(*arrays) if dtype is None else dtype
1037-
if order in ["a", "A"]:
1038-
order = "F" if any(arr.flags.fnc for arr in arrays) else "C"
1037+
if order in "aA":
1038+
order = "F" if all(arr.flags.fnc for arr in arrays) else "C"
10391039

10401040
input_subscripts = [
10411041
_parse_ellipsis_subscript(sub, idx, ndim=arr.ndim)

tests/test_linalg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1710,7 +1710,7 @@ def test_broadcasting_dot_cases(self):
17101710

17111711
def test_output_order(self):
17121712
# Ensure output order is respected for optimize cases, the below
1713-
# conraction should yield a reshaped tensor view
1713+
# contraction should yield a reshaped tensor view
17141714
a = inp.ones((2, 3, 5), order="F")
17151715
b = inp.ones((4, 3), order="F")
17161716

0 commit comments

Comments
 (0)