numpy 1.22.4 Pypi GitHub Homepage
Other Docs
ParametersReturns
_block_info_recursion(arrays, max_depth, result_ndim, depth=0)

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

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

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /numpy/core/shape_base.py#597
type: <class 'function'>
Commit: