MCPcopy Create free account
hub / github.com/numpy/numpy / _block_setup

Function _block_setup

numpy/core/shape_base.py:879–893  ·  view source on GitHub ↗

Returns (`arrays`, list_ndim, result_ndim, final_size)

(arrays)

Source from the content-addressed store, hash-verified

877# or `_block_concatenate` without blocking large arrays to force the wisdom
878# to trigger the desired path.
879def _block_setup(arrays):
880 """
881 Returns
882 (`arrays`, list_ndim, result_ndim, final_size)
883 """
884 bottom_index, arr_ndim, final_size = _block_check_depths_match(arrays)
885 list_ndim = len(bottom_index)
886 if bottom_index and bottom_index[-1] is None:
887 raise ValueError(
888 'List at {} cannot be empty'.format(
889 _block_format_index(bottom_index)
890 )
891 )
892 result_ndim = max(arr_ndim, list_ndim)
893 return arrays, list_ndim, result_ndim, final_size
894
895
896def _block_slicing(arrays, list_ndim, result_ndim):

Callers 4

_block_force_slicingMethod · 0.90
blockFunction · 0.85

Calls 3

_block_format_indexFunction · 0.85
maxFunction · 0.70

Tested by 3

_block_force_slicingMethod · 0.72