See also
Array creation
empty(shape[, dtype, order, like])
empty
Return a new array of given shape and type, without initializing entries.
empty_like(prototype[, dtype, order, subok, …])
empty_like
Return a new array with the same shape and type as a given array.
eye(N[, M, k, dtype, order, like])
eye
Return a 2-D array with ones on the diagonal and zeros elsewhere.
identity(n[, dtype, like])
identity
Return the identity array.
ones(shape[, dtype, order, like])
ones
Return a new array of given shape and type, filled with ones.
ones_like(a[, dtype, order, subok, shape])
ones_like
Return an array of ones with the same shape and type as a given array.
zeros(shape[, dtype, order, like])
zeros
Return a new array of given shape and type, filled with zeros.
zeros_like(a[, dtype, order, subok, shape])
zeros_like
Return an array of zeros with the same shape and type as a given array.
full(shape, fill_value[, dtype, order, like])
full
Return a new array of given shape and type, filled with fill_value.
full_like(a, fill_value[, dtype, order, …])
full_like
Return a full array with the same shape and type as a given array.
array(object[, dtype, copy, order, subok, …])
array
Create an array.
asarray(a[, dtype, order, like])
asarray
Convert the input to an array.
asanyarray(a[, dtype, order, like])
asanyarray
Convert the input to an ndarray, but pass ndarray subclasses through.
ascontiguousarray(a[, dtype, like])
ascontiguousarray
Return a contiguous array (ndim >= 1) in memory (C order).
asmatrix(data[, dtype])
asmatrix
Interpret the input as a matrix.
copy(a[, order, subok])
copy
Return an array copy of the given object.
frombuffer(buffer[, dtype, count, offset, like])
frombuffer
Interpret a buffer as a 1-dimensional array.
fromfile(file[, dtype, count, sep, offset, like])
fromfile
Construct an array from data in a text or binary file.
fromfunction(function, shape, *[, dtype, like])
fromfunction
Construct an array by executing a function over each coordinate.
fromiter(iterable, dtype[, count, like])
fromiter
Create a new 1-dimensional array from an iterable object.
fromstring(string[, dtype, count, sep, like])
fromstring
A new 1-D array initialized from text data in a string.
loadtxt(fname[, dtype, comments, delimiter, …])
loadtxt
Load data from a text file.
numpy.rec
Note
numpy.rec is the preferred alias for numpy.core.records.
numpy.core.records
core.records.array(obj[, dtype, shape, …])
core.records.array
Construct a record array from a wide-variety of objects.
core.records.fromarrays(arrayList[, dtype, …])
core.records.fromarrays
Create a record array from a (flat) list of arrays
core.records.fromrecords(recList[, dtype, …])
core.records.fromrecords
Create a recarray from a list of records in text form.
core.records.fromstring(datastring[, dtype, …])
core.records.fromstring
Create a record array from binary data
core.records.fromfile(fd[, dtype, shape, …])
core.records.fromfile
Create an array from binary file data
numpy.char
numpy.char is the preferred alias for numpy.core.defchararray.
numpy.core.defchararray
core.defchararray.array(obj[, itemsize, …])
core.defchararray.array
Create a chararray.
chararray
core.defchararray.asarray(obj[, itemsize, …])
core.defchararray.asarray
Convert the input to a chararray, copying the data only if necessary.
arange([start,] stop[, step,][, dtype, like])
arange
Return evenly spaced values within a given interval.
linspace(start, stop[, num, endpoint, …])
linspace
Return evenly spaced numbers over a specified interval.
logspace(start, stop[, num, endpoint, base, …])
logspace
Return numbers spaced evenly on a log scale.
geomspace(start, stop[, num, endpoint, …])
geomspace
Return numbers spaced evenly on a log scale (a geometric progression).
meshgrid(*xi[, copy, sparse, indexing])
meshgrid
Return coordinate matrices from coordinate vectors.
mgrid
nd_grid instance which returns a dense multi-dimensional “meshgrid”.
ogrid
nd_grid instance which returns an open multi-dimensional “meshgrid”.
diag(v[, k])
diag
Extract a diagonal or construct a diagonal array.
diagflat(v[, k])
diagflat
Create a two-dimensional array with the flattened input as a diagonal.
tri(N[, M, k, dtype, like])
tri
An array with ones at and below the given diagonal and zeros elsewhere.
tril(m[, k])
tril
Lower triangle of an array.
triu(m[, k])
triu
Upper triangle of an array.
vander(x[, N, increasing])
vander
Generate a Vandermonde matrix.
mat(data[, dtype])
mat
bmat(obj[, ldict, gdict])
bmat
Build a matrix object from a string, nested sequence, or array.