Array creation routines#

This is the list of nodes available within VisuAlea in the numpy.creation package. The reference documentation is generated from numpy files, see also API reference on Numpy

Ones and zeros#

empty(shape[, dtype, order, device, like])

Return a new array of given shape and type, without initializing entries.

empty_like

empty_like(prototype, dtype=None, order='K', subok=True, shape=None, *,

eye(N[, M, k, dtype, order, device, like])

Return a 2-D array with ones on the diagonal and zeros elsewhere.

identity(n[, dtype, like])

Return the identity array.

ones(shape[, dtype, order, device, like])

Return a new array of given shape and type, filled with ones.

ones_like(a[, dtype, order, subok, shape, ...])

Return an array of ones with the same shape and type as a given array.

zeros(shape[, dtype, order, like])

Return a new array of given shape and type, filled with zeros.

zeros_like(a[, dtype, order, subok, shape, ...])

Return an array of zeros with the same shape and type as a given array.

From existing data#

array

array(object, dtype=None, *, copy=True, order='K', subok=False, ndmin=0,

fromfunction(function, shape, *[, dtype, like])

Construct an array by executing a function over each coordinate.

loadtxt(fname[, dtype, comments, delimiter, ...])

Load data from a text file.

load(file[, mmap_mode, allow_pickle, ...])

Load arrays or pickled objects from .npy, .npz or pickled files.

Numerical ranges#

arange([start,] stop[, step,][, dtype, ...])

Return evenly spaced values within a given interval.

linspace(start, stop[, num, endpoint, ...])

Return evenly spaced numbers over a specified interval.

logspace(start, stop[, num, endpoint, base, ...])

Return numbers spaced evenly on a log scale.

meshgrid(*xi[, copy, sparse, indexing])

Return a tuple of coordinate matrices from coordinate vectors.

Building matrices#

diag(v[, k])

Extract a diagonal or construct a diagonal array.

diagflat(v[, k])

Create a two-dimensional array with the flattened input as a diagonal.

tri(N[, M, k, dtype, like])

An array with ones at and below the given diagonal and zeros elsewhere.

tril(m[, k])

Lower triangle of an array.

triu(m[, k])

Upper triangle of an array.

vander(x[, N, increasing])

Generate a Vandermonde matrix.

The Matrix class#