On Sun, Sep 21, 2008 at 7:51 PM, Dinesh B Vadhia
<[EMAIL PROTECTED]>wrote:
> Ooops, I should have said that this is easy to do with 2 for loops ie.
>
> import numpy
> from collections import defaultdict
> A =
> [[1 6 1 2 3]
> [4 5 4 7 0]
> [2 0 8 0 2]
> [0 0 0 3 7]
> [0 7 0 3 5]
> [8 0 3 0 6
Ooops, I should have said that this is easy to do with 2 for loops ie.
import numpy
from collections import defaultdict
A =
[[1 6 1 2 3]
[4 5 4 7 0]
[2 0 8 0 2]
[0 0 0 3 7]
[0 7 0 3 5]
[8 0 3 0 6]
[8 0 0 2 2]
[3 1 0 4 0]
[5 0 8 0 0]
[2 1 0 5 6]]
dict = defaultdict(list)
I = A.shape[0]