Array Manipulation Routines
Basic operations
Copies values from one array to another, broadcasting as necessary. |
|
Return the shape of an array. |
Changing array shape
Gives a new shape to an array without changing its data. |
|
Return a contiguous flattened array. |
|
Return a flat iterator, or set a flattened version of self to value. |
|
Return a copy of the array collapsed into one dimension. |
Transpose-like operations
Move axes of an array to new positions. |
|
Roll the elements of an array by a number of positions along a given axis. |
|
Roll the specified axis backwards, until it lies in a given position. |
|
Interchange two axes of an array. |
|
View of the transposed array. |
|
Returns an array with axes transposed. |
Changing number of dimensions
Convert inputs to arrays with at least one dimension. |
|
View inputs as arrays with at least two dimensions. |
|
View inputs as arrays with at least three dimensions. |
|
Broadcast an array to a new shape. |
|
Broadcast any number of arrays against each other. |
|
Expand the shape of an array. |
|
Removes singleton dimensions (axes) from array a. |
Changing kind of array
Converts an input object into array. |
|
Returns the NumPy array with input data. |
|
Convert the input to an |
|
Return an array converted to a float type. |
|
Return an array |
|
Return a contiguous array in memory (C order). |
Joining arrays
Join a sequence of arrays along an existing axis. |
|
Join a sequence of arrays along a new axis. |
|
Stack arrays in sequence vertically (row wise). |
|
Stack arrays in sequence horizontally (column wise). |
|
Stacks 1-D and 2-D arrays as columns into a 2-D array. |
|
Stack arrays in sequence vertically (row wise). |
|
Stack arrays in sequence depth wise (along third axis). |
Splitting arrays
Tiling arrays
Construct an array by repeating A the number of times given by reps. |
|
Repeat elements of an array. |
Adding and removing elements
Find the unique elements of an array. |
|
Trim the leading and/or trailing zeros from a 1-D array. |
Rearranging elements
Reverse the order of elements in an array along the given axis. |
|
Reverse the order of elements along axis 1 (left/right). |
|
Reverse the order of elements along axis 0 (up/down). |
|
Gives a new shape to an array without changing its data. |
|
Roll the elements of an array by a number of positions along a given axis. |