Actually do the multiplication with the given order.
(arrays, order, i, j, out=None)
| 2824 | |
| 2825 | |
| 2826 | def _multi_dot(arrays, order, i, j, out=None): |
| 2827 | """Actually do the multiplication with the given order.""" |
| 2828 | if i == j: |
| 2829 | # the initial call with non-None out should never get here |
| 2830 | assert out is None |
| 2831 | |
| 2832 | return arrays[i] |
| 2833 | else: |
| 2834 | return dot(_multi_dot(arrays, order, i, order[i, j]), |
| 2835 | _multi_dot(arrays, order, order[i, j] + 1, j), |
| 2836 | out=out) |