pysteps.utils.arrays.compute_centred_coord_array
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
- Mint
The height of the array.
- Nint
The width of the array.
- Returns
- outndarray
The coordinate array.
Examples
>>> compute_centred_coord_array(2, 2)
(array([[-2],
[-1],
[ 0],
[ 1],
[ 2]]), array([[-2, -1, 0, 1, 2]]))