pysteps.utils.arrays.compute_centred_coord_array¶
-
pysteps.utils.arrays.
compute_centred_coord_array
(M, N)¶ Compute a 2D coordinate array, where the origin is at the center.
Parameters: - M : int
The height of the array.
- N : int
The width of the array.
Returns: - out : ndarray
The coordinate array.
Examples
>>> compute_centred_coord_array(2, 2)
(array([[-2],
[-1],
[ 0],
[ 1],
[ 2]]), array([[-2, -1, 0, 1, 2]]))