擅长:python、mysql、java
<p>您可以使用numpy的<a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.mgrid.html" rel="noreferrer">mgrid</a>生成所有可能的组合:</p>
<pre><code>>>> py, px = np.mgrid[5:480:5, 5:640:5]
>>> points = np.c_[py.ravel(), px.ravel()]
>>> points
array([[ 5, 5],
[ 5, 10],
[ 5, 15],
...,
[475, 625],
[475, 630],
[475, 635]])
</code></pre>