{ } Raw JSON

bundles / numpy 2.4.4 / numpy / _core / shape_base / _block_info_recursion

function

numpy._core.shape_base:_block_info_recursion

source: /numpy/_core/shape_base.py :695

Signature

def   _block_info_recursion ( arrays max_depth result_ndim depth = 0 )

Summary

Returns the shape of the final array, along with a list of slices and a list of arrays that can be used for assignment inside the new array

Parameters

arrays : nested list of arrays

The arrays to check

max_depth : list of int

The number of nested lists

result_ndim : int

The number of dimensions in thefinal array.

Returns

shape : tuple of int

The shape that the final array will take on.

: slices: list of tuple of slices

The slices into the full array required for assignment. These are required to be prepended with (Ellipsis, ) to obtain to correct final index.

: arrays: list of ndarray

The data to assign to each slice of the full array

Aliases

  • numpy._core.shape_base._block_info_recursion