numpy.atleast_3d() in Python

The numpy.atleast_3d() function views the inputs as arrays with at least three dimensions.

Syntax

Parameter

arys1, arys2, … : This parameter represents one or more array-like sequences where the non-array inputs are converted to arrays.

Return

This function returns an array, or list of arrays, each with a.ndim >= 3.

Example 1

Output

Example 2

Output

Pin It on Pinterest

Share This