Actually do the multiplication with the given order.
(arrays, order, i, j, out=None)
| 3044 | |
| 3045 | |
| 3046 | def _multi_dot(arrays, order, i, j, out=None): |
| 3047 | """Actually do the multiplication with the given order.""" |
| 3048 | if i == j: |
| 3049 | # the initial call with non-None out should never get here |
| 3050 | assert out is None |
| 3051 | |
| 3052 | return arrays[i] |
| 3053 | else: |
| 3054 | return dot(_multi_dot(arrays, order, i, order[i, j]), |
| 3055 | _multi_dot(arrays, order, order[i, j] + 1, j), |
| 3056 | out=out) |
| 3057 | |
| 3058 | |
| 3059 | # diagonal |