Miscellaneous functions for dealing with numpy arrays.
Element type for an array of Glimpse activation values.
alias of float32
Short-hand to find array indices containing the maximum value.
Short-hand to find array indices containing the minimum value.
Flatten a list of numpy arrays to a single numpy vector.
| Return type: | ndarray |
|---|
Create a greyscale image from a 2D numpy array.
This function assumes range of input values contains 0.
Create a color image from an array.
| Return type: | PIL.Image |
|---|
Remove the border of an array.
| Parameters: |
|
|---|---|
| Return type: | ndarray |
| Returns: | View of the central region of input array. |
Pad the border of an array with a constant value.
Scale elements of vector (in place), such that result has unit norm.