Get the shape of nested list
(a)
| 5474 | |
| 5475 | |
| 5476 | def shapelist(a): |
| 5477 | """Get the shape of nested list""" |
| 5478 | if type(a) is list: |
| 5479 | return tuple([len(a)] + list(shapelist(a[0]))) |
| 5480 | else: |
| 5481 | return () |
| 5482 | |
| 5483 | |
| 5484 | def transposelist(arrays, axes, extradims=0): |
no outgoing calls
no test coverage detected
searching dependent graphs…