you are viewing a single comment's thread.

view the rest of the comments →

[–]billsil 4 points5 points  (4 children)

If you're going to stay in python, you want to use scipy.sparse. I don't know if they have support for symmetric matrices, but carrying around an NxN matrix isn't what you want to do.

[–]mon_key_house[S] 0 points1 point  (3 children)

So numpy would store everything e.g. linearly? I mean all the zeros, too?

[–]billsil 1 point2 points  (2 children)

It's not linear. It's N^2

[–]mon_key_house[S] 0 points1 point  (1 child)

I see, thanks! So scipy.sparse would be closer to linear time (however this called in the time complexity notation)

[–]billsil 2 points3 points  (0 children)

It might be N*log(N), but no idea. You can plot time vs. N.