Generate all possible tuples of indices.
(shape)
| 322 | return _fa(items, shape) |
| 323 | |
| 324 | def indices(shape): |
| 325 | """Generate all possible tuples of indices.""" |
| 326 | iterables = [range(v) for v in shape] |
| 327 | return product(*iterables) |
| 328 | |
| 329 | def getindex(ndim, ind, strides): |
| 330 | """Convert multi-dimensional index to the position in the flat list.""" |
no outgoing calls
no test coverage detected