From: Dominique O. <dom...@gm...> - 2009-07-01 20:47:44
|
On Wed, Jul 1, 2009 at 4:33 PM, Oz Nahum <na...@gm...> wrote: > 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. > Hi Oz, You are not doing anything wrong, but I am not sure we still have anyone to maintain a deb for Pysparse. The one you have is for an outdated version of Pysparse. You will have access to the find() method if you use the svn version of Pysparse. Your script works as is for me. Cheers, Dominique |