Convert multi-dimensional index to the position in the flat list.
(ndim, ind, strides)
| 339 | return product(*iterables) |
| 340 | |
| 341 | def getindex(ndim, ind, strides): |
| 342 | """Convert multi-dimensional index to the position in the flat list.""" |
| 343 | ret = 0 |
| 344 | for i in range(ndim): |
| 345 | ret += strides[i] * ind[i] |
| 346 | return ret |
| 347 | |
| 348 | def transpose(src, shape): |
| 349 | """Transpose flat item list that is regarded as a multi-dimensional |
no outgoing calls
no test coverage detected
searching dependent graphs…