Make a mesh same size as yours, but with simpler numbers:
In [1]: input = 5;
In [2]: x1 = np.linspace(0,1,input+1)
In [3]: x1
Out[3]: array([0. , 0.2, 0.4, 0.6, 0.8, 1. ])
In [5]: I,J = np.meshgrid(x1,x1,indexing='ij')
In [6]: I,J
Out[6]:
(array([[0. , 0. , 0. , 0. , 0. , 0. ],
[0.2, 0.2, 0.2, 0.2, 0.2, 0.2],
[0.4, 0.4, 0.4, 0.4, 0.4, 0.4],
[0.6, 0.6, 0.6, 0.6, 0.6, 0.6],
[0.8, 0.8, 0.8, 0.8, 0.8, 0.8],
[1. , 1. , 1. , 1. , 1. , 1. ]]),
array([[0. , 0.2, 0.4, 0.6, 0.8, 1. ],
[0. , 0.2, 0.4, 0.6, 0.8, 1. ],
[0. , 0.2, 0.4, 0.6, 0.8, 1. ],
[0. , 0.2, 0.4, 0.6, 0.8, 1. ],
[0. , 0.2, 0.4, 0.6, 0.8, 1. ],
[0. , 0.2, 0.4, 0.6, 0.8, 1. ]]))
We could make a new mesh with one less point in each direction:
In [7]: x2 = np.linspace(.1,.9,input)
In [8]: x2
Out[8]: array([0.1, 0.3, 0.5, 0.7, 0.9])
In [10]: np.meshgrid(x2,x2,indexing='ij')
Out[10]:
[array([[0.1, 0.1, 0.1, 0.1, 0.1],
[0.3, 0.3, 0.3, 0.3, 0.3],
[0.5, 0.5, 0.5, 0.5, 0.5],
[0.7, 0.7, 0.7, 0.7, 0.7],
[0.9, 0.9, 0.9, 0.9, 0.9]]),
array([[0.1, 0.3, 0.5, 0.7, 0.9],
[0.1, 0.3, 0.5, 0.7, 0.9],
[0.1, 0.3, 0.5, 0.7, 0.9],
[0.1, 0.3, 0.5, 0.7, 0.9],
[0.1, 0.3, 0.5, 0.7, 0.9]])]
Alternatively we could average points in the original mesh:
In [11]: (I[1:,1:]+I[:-1,:-1])/2
Out[11]:
array([[0.1, 0.1, 0.1, 0.1, 0.1],
[0.3, 0.3, 0.3, 0.3, 0.3],
[0.5, 0.5, 0.5, 0.5, 0.5],
[0.7, 0.7, 0.7, 0.7, 0.7],
[0.9, 0.9, 0.9, 0.9, 0.9]])
In [12]: (J[1:,1:]+J[:-1,:-1])/2
Out[12]:
array([[0.1, 0.3, 0.5, 0.7, 0.9],
[0.1, 0.3, 0.5, 0.7, 0.9],
[0.1, 0.3, 0.5, 0.7, 0.9],
[0.1, 0.3, 0.5, 0.7, 0.9],
[0.1, 0.3, 0.5, 0.7, 0.9]])