numpy.atleast_1d() in Python

The numpy.atleast_1d() function converts the inputs to arrays with at least one dimension.

Syntax

Parameter

arys1, arys2, … : This parameter represents one or more input arrays.

Return

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

Example 1

Output

Example 2

Output

Pin It on Pinterest

Share This