numpy.dstack() in Python

The numpy.dstack() function stacks the arrays in sequence depth wise (along third axis).

Syntax

Parameter

tup: This parameter represents the sequence of arrays where the arrays must have the same shape along all except the third axis.

Return

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

Example 1

Output

Pin It on Pinterest

Share This