Robert Kern a écrit :
> ((data[:,0]xmax) | (data[:,1] (data[:,1]>ymax)).sum()
Nice, as usual ;-)
I did not know this writing.
Thanks a lot.
Cheers,
--
Fred
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/l
On Wed, Jun 17, 2009 at 17:32, fred wrote:
> Hi all,
>
> Let's say I have an array (n,3) ie x, y, v, in each row.
>
> How can I count the number of points (x,y) that are out of bounds (xmin,
> xmax) (ymin, ymax)?
>
> The following is obviously wrong:
>
> n = (data[:, 0] (data[:, 0
Hi all,
Let's say I have an array (n,3) ie x, y, v, in each row.
How can I count the number of points (x,y) that are out of bounds (xmin,
xmax) (ymin, ymax)?
The following is obviously wrong:
n = (data[:, 0]xmax).nonzero()[0].size + \
(data[:, 1]ymax).nonzero()[0].size
and