Array Creation Routines
The following tables show array creation routines provided by NLCPy.
Ones and Zeros
Returns a new array of given shape and type, without initializing entries. |
|
Returns a new array with the same shape and type as a given array. |
|
Returns a 2-D array with ones on the diagonal and zeros elsewhere. |
|
Returns the identity array. |
|
Returns a new array of given shape and type, filled with ones. |
|
Returns an array of ones with the same shape and type as a given array. |
|
Returns a new array of given shape and type, filled with zeros. |
|
Returns an array of zeros with the same shape and type as a given array. |
|
Returns a new array of given shape and type, filled with fill_value. |
|
Returns a full array with the same shape and type as a given array. |
From Existing Data
Creates an array. |
|
Converts the input to an array. |
|
Converts the input to an array, but passes ndarray subclasses through. |
|
Returns an array copy of the given object. |
|
Constructs an array from data in a text or binary file. |
|
Loads data from a text file. |
Numerical Ranges
Returns evenly spaced values within a given interval. |
|
Returns evenly spaced numbers over a specified interval. |
|
Returns numbers spaced evenly on a log scale. |
|
Returns coordinate matrices from coordinate vectors. |
Building Matrices
Extracts a diagonal or constructs a diagonal array. |
|
Creates a two-dimensional array with the flattened input as a diagonal. |
|
An array with ones at and below the given diagonal and zeros elsewhere. |
|
Lower triangle of an array. |
|
Upper triangle of an array. |