On Mon, Oct 12, 2009 at 9:39 AM, Gökhan Sever wrote:
>
>
> On Mon, Oct 12, 2009 at 9:18 AM, per freem wrote:
>
>> hi all,
>>
>> i'm trying to find nonzero elements in an array, as follows:
>>
>> a = array([[1, 0],
>> [1, 1],
>> [1, 1],
>> [0, 1]])
>>
>> i want to find all eleme
On Mon, Oct 12, 2009 at 9:18 AM, per freem wrote:
> hi all,
>
> i'm trying to find nonzero elements in an array, as follows:
>
> a = array([[1, 0],
> [1, 1],
> [1, 1],
> [0, 1]])
>
> i want to find all elements that are [1,1]. i tried: nonzero(a ==
> [1,0]) but i cannot interpre
On Mon, Oct 12, 2009 at 10:18 AM, per freem wrote:
> hi all,
>
> i'm trying to find nonzero elements in an array, as follows:
>
> a = array([[1, 0],
> [1, 1],
> [1, 1],
> [0, 1]])
>
> i want to find all elements that are [1,1]. i tried: nonzero(a ==
> [1,0]) but i cannot interpre
hi all,
i'm trying to find nonzero elements in an array, as follows:
a = array([[1, 0],
[1, 1],
[1, 1],
[0, 1]])
i want to find all elements that are [1,1]. i tried: nonzero(a ==
[1,0]) but i cannot interpret the output. the output i get is:
(array([0, 0, 1, 2]), array([0, 1