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 – The coordinate array.
- Return type:
ndarray
Examples
>>> compute_centred_coord_array(2, 2)
(array([[-2],
[-1],
[ 0],
[ 1],
[ 2]]), array([[-2, -1, 0, 1, 2]]))