Skip to content

Commit 23a3495

Browse files
committed
Update dpnp.einsum_path to cast input to numpy array explicitly
1 parent 1dc6dec commit 23a3495

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

dpnp/dpnp_iface_linearalgebra.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,12 @@ def einsum_path(*operands, optimize="greedy", einsum_call=False):
548548
549549
"""
550550

551+
# explicit casting to numpy array if applicable
552+
operands = [
553+
dpnp.asnumpy(x) if dpnp.is_supported_array_type(x) else x
554+
for x in operands
555+
]
556+
551557
return numpy.einsum_path(
552558
*operands,
553559
optimize=optimize,

0 commit comments

Comments
 (0)