Skip to main content

Module creation

Module creation 

Source

Structs§

UninitArray
An array whose elements have not been initialized.

Traits§

ArangeNum
Trait for types usable with arange — numeric types that support stepping and comparison.
LinspaceNum
Trait for float-like types used in linspace/logspace/geomspace.

Functions§

arange
Create a 1-D array with evenly spaced values within a given interval.
array
Create an array from a flat vector and a shape (C-order).
asanyarray
Convert input to an array. Accepts an existing array (no-op clone).
asarray
Interpret existing data as an array without copying (if possible).
asarray_chkfinite
Convert the input to an array, checking for NaNs or infinities.
ascontiguousarray
Return a contiguous array (C order) in memory.
asfortranarray
Return an array (Fortran-order) by transposing then cloning.
copy
Return an array copy of the given object.
diag
Extract a diagonal or construct a diagonal array.
diagflat
Create a 2-D array with the flattened input as a diagonal.
empty
Create an uninitialized array.
empty_like
Create an uninitialized array with the same shape (and element type) as other.
eye
Create a 2-D array with ones on the diagonal and zeros elsewhere.
frombuffer
Create an array from a byte buffer, interpreting bytes as elements of type T.
frombuffer_view
Create a zero-copy ArrayView over an existing byte buffer (#364).
fromfile
Read a 1-D array from a file by parsing whitespace-delimited tokens.
fromfunction
Construct an array by executing a function over each coordinate.
fromiter
Create a 1-D array from an iterator.
fromstring
Construct a 1-D array from a whitespace- or separator-delimited string.
full
Create an array filled with a given value.
full_like
Create an array with the same shape as other, filled with fill_value.
geomspace
Create a 1-D array with values spaced evenly on a geometric (log) scale.
identity
Create a 2-D identity matrix of size n x n.
linspace
Create a 1-D array with num evenly spaced values between start and stop.
logspace
Create a 1-D array with values spaced evenly on a log scale.
meshgrid
Return coordinate arrays from coordinate vectors.
mgrid
Create a dense multi-dimensional “meshgrid” with matrix (‘ij’) indexing.
ogrid
Create a sparse (open) multi-dimensional “meshgrid” with ‘ij’ indexing.
ones
Create an array filled with ones.
ones_like
Create an array with the same shape as other, filled with ones.
require
Return a contiguous array meeting requirements.
tri
Create a lower-triangular matrix of ones.
tril
Return the lower triangle of a 2-D array.
triu
Return the upper triangle of a 2-D array.
vander
Generate a Vandermonde matrix.
zeros
Create an array filled with zeros.
zeros_like
Create an array with the same shape as other, filled with zeros.