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. |
|
Permutes the dimensions of an array. |
Changing Number of Dimensions¶
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). |
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. |
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. |