Get the shape of lst after slicing: slices is a list of slice objects.
(lst, slices)
| 363 | return _flatten(lst) |
| 364 | |
| 365 | def slice_shape(lst, slices): |
| 366 | """Get the shape of lst after slicing: slices is a list of slice |
| 367 | objects.""" |
| 368 | if atomp(lst): |
| 369 | return [] |
| 370 | return [len(lst[slices[0]])] + slice_shape(lst[0], slices[1:]) |
| 371 | |
| 372 | def multislice(lst, slices): |
| 373 | """Multi-dimensional slicing: slices is a list of slice objects.""" |
no test coverage detected