numpy.vstack() in Python

The numpy.vstack() function stacks the arrays in a sequence vertically (row wise).

Syntax

Parameter

tup: This parameter represents the sequence of ‘ndarrays’ where the arrays must have the same shape along all except the first axis.

Return

This function returns the array formed by stacking the given arrays, will be at least 2-D.

Example 1

Output

Pin It on Pinterest

Share This