numpy 1.22.4 Pypi GitHub Homepage
Other Docs
BackRef
array_split(ary, indices_or_sections, axis=0)

Please refer to the split documentation. The only difference between these functions is that array_split allows :None:None:`indices_or_sections` to be an integer that does not equally divide the axis. For an array of length l that should be split into n sections, it returns l % n sub-arrays of size l//n + 1 and the rest of size l//n.

Split an array into multiple sub-arrays.

See Also

split

Split array into multiple sub-arrays of equal size.

Examples

>>> x = np.arange(8.0)
... np.array_split(x, 3) [array([0., 1., 2.]), array([3., 4., 5.]), array([6., 7.])]
>>> x = np.arange(9)
... np.array_split(x, 4) [array([0, 1, 2]), array([3, 4]), array([5, 6]), array([7, 8])]
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

numpy.split numpy.concatenate numpy.core._multiarray_umath.concatenate

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/lib/shape_base.py#739
type: <class 'function'>
Commit: