(arrays)
| 690 | |
| 691 | |
| 692 | def _block_dispatcher(arrays): |
| 693 | # Use type(...) is list to match the behavior of np.block(), which special |
| 694 | # cases list specifically rather than allowing for generic iterables or |
| 695 | # tuple. Also, we know that list.__array_function__ will never exist. |
| 696 | if type(arrays) is list: |
| 697 | for subarrays in arrays: |
| 698 | yield from _block_dispatcher(subarrays) |
| 699 | else: |
| 700 | yield arrays |
| 701 | |
| 702 | |
| 703 | @array_function_dispatch(_block_dispatcher) |
no outgoing calls