Skip to content

Commit 6d89e5b

Browse files
fix the outer function implementation (#1001)
1 parent 6089741 commit 6d89e5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dpnp/dpnp_algo/dpnp_algo_linearalgebra.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,6 @@ cpdef utils.dpnp_descriptor dpnp_outer(utils.dpnp_descriptor array1, utils.dpnp_
305305

306306
for idx1 in range(array1.size):
307307
for idx2 in range(array2.size):
308-
result.get_pyobj()[idx1 * array2.size + idx2] = array1.get_pyobj()[idx1] * array2.get_pyobj()[idx2]
308+
result.get_pyobj()[numpy.unravel_index(idx1 * array2.size + idx2, result.shape)] = array1.get_pyobj()[numpy.unravel_index(idx1, array1.shape)] * array2.get_pyobj()[numpy.unravel_index(idx2, array2.shape)]
309309

310310
return result

0 commit comments

Comments
 (0)