Get the shape of lst after slicing: slices is a list of slice objects.
(lst, slices)
| 375 | return _flatten(lst) |
| 376 | |
| 377 | def slice_shape(lst, slices): |
| 378 | """Get the shape of lst after slicing: slices is a list of slice |
| 379 | objects.""" |
| 380 | if atomp(lst): |
| 381 | return [] |
| 382 | return [len(lst[slices[0]])] + slice_shape(lst[0], slices[1:]) |
| 383 | |
| 384 | def multislice(lst, slices): |
| 385 | """Multi-dimensional slicing: slices is a list of slice objects.""" |
no test coverage detected
searching dependent graphs…