A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.scipy.org/doc/numpy/reference/generated/numpy.atleast_1d.html below:

numpy.atleast_1d — NumPy v2.3 Manual

numpy.atleast_1d#
numpy.atleast_1d(*arys)[source]#

Convert inputs to arrays with at least one dimension.

Scalar inputs are converted to 1-dimensional arrays, whilst higher-dimensional inputs are preserved.

Parameters:
arys1, arys2, …array_like

One or more input arrays.

Returns:
retndarray

An array, or tuple of arrays, each with a.ndim >= 1. Copies are made only if necessary.

Examples

>>> import numpy as np
>>> np.atleast_1d(1.0)
array([1.])
>>> x = np.arange(9.0).reshape(3,3)
>>> np.atleast_1d(x)
array([[0., 1., 2.],
       [3., 4., 5.],
       [6., 7., 8.]])
>>> np.atleast_1d(x) is x
True
>>> np.atleast_1d(1, [3, 4])
(array([1]), array([3, 4]))

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4