Array Manipulation Routines
The following tables show array manipulation routines provided by NLCPy.
Basic Operations
Returns the shape of an array. |
|
Copies values from one array to another, broadcasting as necessary. |
Changing Array Shape
Gives a new shape to an array without changing its data. |
|
Returns a contiguous flattened array. |
Transpose-like Operations
Moves axes of an array to new positions. |
|
Rolls the specified axis backwards, until it lies in a given position. |
|
Interchanges two axes of an array. |
|
Permutes the dimensions of an array. |
Changing Number of Dimensions
Converts inputs to arrays with at least one dimension. |
|
Views inputs as arrays with at least two dimensions. |
|
Views inputs as arrays with at least three dimensions. |
|
Broadcasts any number of arrays against each other. |
|
Broadcasts an array to a new shape. |
|
Expands the shape of an array. |
|
Removes single-dimensional entries from the shape of an array. |
Joining Arrays
Joins a sequence of arrays along an existing axis. |
|
Stacks arrays in sequence horizontally (column wise). |
|
Joins a sequence of arrays along a new axis. |
|
Stacks arrays in sequence vertically (row wise). |
|
Assembles an nd-array from nested lists of blocks. |
Splitting arrays
Splits an array into multiple sub-arrays. |
|
Splits an array into multiple sub-arrays horizontally (column-wise). |
|
Splits an array into multiple sub-arrays vertically (row-wise). |
Tiling Arrays
Constructs an array by repeating A the number of times given by reps. |
|
Repeats elements of an array. |
Adding and Removing Elements
Appends values to the end of an array. |
|
Returns a new array with sub-arrays along an axis deleted. |
|
Inserts values along the given axis before the given indices. |
|
Returns a new array with the specified shape. |
|
Finds the unique elements of an array. |
Rearranging Elements
Reverses the order of elements in an array along the given axis. |
|
Flips array in the left/right direction. |
|
Flips array in the up/down direction. |
|
Rolls array elements along a given axis. |