Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #96317

Re: subdividing a rectangle using numpy

From Nobody <nobody@nowhere.invalid>
Newsgroups comp.lang.python
Subject Re: subdividing a rectangle using numpy
Date 2015-09-11 04:47 +0100
Organization A noiseless patient Spider
Message-ID <pan.2015.09.11.03.47.21.567000@nowhere.invalid> (permalink)
References <mailman.351.1441940743.8327.python-list@python.org>

Show all headers | View raw


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.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

subdividing a rectangle using numpy Seb <spluque@gmail.com> - 2015-09-10 22:05 -0500
  Re: subdividing a rectangle using numpy Nobody <nobody@nowhere.invalid> - 2015-09-11 04:47 +0100

csiph-web