MCPcopy Index your code
hub / github.com/numpy/numpy / _block_format_index

Function _block_format_index

numpy/_core/shape_base.py:549–554  ·  view source on GitHub ↗

Convert a list of indices ``[0, 1, 2]`` into ``"arrays[0][1][2]"``.

(index)

Source from the content-addressed store, hash-verified

547
548
549def _block_format_index(index):
550 """
551 Convert a list of indices ``[0, 1, 2]`` into ``"arrays[0][1][2]"``.
552 """
553 idx_str = ''.join(f'[{i}]' for i in index if i is not None)
554 return 'arrays' + idx_str
555
556
557def _block_check_depths_match(arrays, parent_index=[]):

Callers 2

_block_setupFunction · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…