Fri, 10 Sep 2010 14:35:46 +0200, Radek Machulka wrote:

> Thanks, but...
> 
>>>> x = array([[0,0,0,0],[0,1,0,0],[0,0,1,1],[0,0,0,0]]) x
> array([[0, 0, 0, 0],
>        [0, 1, 0, 0],
>        [0, 0, 1, 1],
>        [0, 0, 0, 0]])
>>>> i, j = x.any(0).nonzero()[0], x.any(1).nonzero()[0] 

Should be 

>>> j, i = x.any(0).nonzero()[0], x.any(1).nonzero()[0] 

_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to