We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6089741 commit 6d89e5bCopy full SHA for 6d89e5b
1 file changed
dpnp/dpnp_algo/dpnp_algo_linearalgebra.pyx
@@ -305,6 +305,6 @@ cpdef utils.dpnp_descriptor dpnp_outer(utils.dpnp_descriptor array1, utils.dpnp_
305
306
for idx1 in range(array1.size):
307
for idx2 in range(array2.size):
308
- result.get_pyobj()[idx1 * array2.size + idx2] = array1.get_pyobj()[idx1] * array2.get_pyobj()[idx2]
+ 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)]
309
310
return result
0 commit comments