subdividing a rectangle using numpy
nobody at nowhere.invalid
Fri Sep 11 05:47:23 CEST 2015
On Thu, 10 Sep 2015 22:05:07 -0500, Seb wrote:
> The key to my solution was to use numpy's meshgrid to generate the
> coordinates for defining the sub-units. However, it seems awfully
> complex and contrived,
Half a dozen lines of code is "complex and contrived"?
Also, you should lose marks for having those for loops. Hint:
corners = np.array([[0,0],[0,1],[1,1],[1,0],[0,0]])
> or perhaps some package offers this functionality.
People don't write packages for such trivial tasks.
More information about the Python-list