From: Oz N. <na...@gm...> - 2009-07-01 20:33:24
|
Hi Everyone, I find pysparse a very nice tool. I've been playing around with it for a couple of days. I was wondering how use the find() function. it try this: >>> from pysparse import * >>> m = 5 >>> n = 5 >>> >>> A = spmatrix.ll_mat(m*n, m*n) >>> >>> H = 3 >>> V = 2 >>> a = [0,0,] #row index >>> b = [0,1,] #column index >>> val = [H+V, -H,] #node value >>> A.put(val,a,b) >>> >>> val1, a1,b1 = A.find() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: find It seems the object does not have this function, or most likely I am doing something wrong... I am using the latest debian package of pysparse, any help would be appreciated. Thanks, Oz -- ---- Imagine there's no countries It isn't hard to do Nothing to kill or die for And no religion too Imagine all the people Living life in peace |