Array creation routines#
Ones and zeros#
|
Returns an array without initializing the elements. |
|
Returns a new array with same shape and dtype of a given array. |
|
Returns a 2-D array with ones on the diagonals and zeros elsewhere. |
|
Returns a 2-D identity array. |
|
Returns a new array of given shape and dtype, filled with ones. |
|
Returns an array of ones with same shape and dtype as a given array. |
|
Returns a new array of given shape and dtype, filled with zeros. |
|
Returns an array of zeros with same shape and dtype as a given array. |
|
Returns a new array of given shape and dtype, filled with a given value. |
|
Returns a full array with same shape and dtype as a given array. |
From existing data#
|
Creates an array on the current device. |
|
Converts an object to array. |
|
Converts an object to array. |
|
Returns a C-contiguous array. |
|
Creates a copy of a given array on the current device. |
|
Interpret a buffer as a 1-dimensional array. |
|
Reads an array from a file. |
|
Construct an array by executing a function over each coordinate. |
|
Create a new 1-dimensional array from an iterable object. |
|
A new 1-D array initialized from text data in a string. |
|
Load data from a text file. |
Numerical ranges#
|
Returns an array with evenly spaced values within a given interval. |
|
Returns an array with evenly-spaced values within a given interval. |
|
Returns an array with evenly-spaced values on a log-scale. |
|
Return coordinate matrices from coordinate vectors. |
Construct a multi-dimensional "meshgrid". |
|
Construct a multi-dimensional "meshgrid". |
Building matrices#
|
Returns a diagonal or a diagonal array. |
|
Creates a diagonal array from the flattened input. |
|
Creates an array with ones at and below the given diagonal. |
|
Returns a lower triangle of an array. |
|
Returns an upper triangle of an array. |
|
Returns a Vandermonde matrix. |