You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2007 |
Jan
(2) |
Feb
(5) |
Mar
(2) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(6) |
Jul
(6) |
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
(1) |
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
(6) |
Oct
(8) |
Nov
(19) |
Dec
(2) |
2010 |
Jan
(4) |
Feb
(4) |
Mar
(17) |
Apr
(12) |
May
(10) |
Jun
(17) |
Jul
(2) |
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
(3) |
Apr
(2) |
May
|
Jun
(9) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(4) |
Feb
(12) |
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(2) |
2014 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
From: Dominique O. <dom...@gm...> - 2009-09-13 23:49:57
|
On Fri, Sep 4, 2009 at 8:09 AM, Jose Blanca<jb...@bt...> wrote: > Hi: > I'm new to pyparse, thanks for doing this tool open source. > I'm trying to store an sparse vector and to get the results. My requirements > a quite simple I just need to store some items and to get them at the end of > the analysis. > I've created the matrix with: > vect = pysparse.spmatrix.ll_mat(nelements, 1, size_hint) > > And now I want to get the items from the matrix. I could do: > items = vect.items() > > The problem is that the created items is a list not an iterator. That consumes > a lot of extra memory just to access the matrix. Is this the expected > behaviour or am I missing something? Hi Jose, Sorry for the late reply. Pysparse objects are not iterable and weren't really designed to store vectors (although they obviously can) but large sparse matrices. As Lukasz suggested, you can use find() to get the values in triple format as Numpy arrays and iterate through those. However, you may find it more convenient to simply store your sparse vector in a dictionary and iterate through the list of items. -- Dominique |
From: <lu...@o2...> - 2009-09-04 12:50:57
|
Jose Blanca <jb...@bt...> writes: > Hi: > I'm new to pyparse, thanks for doing this tool open source. > I'm trying to store an sparse vector and to get the results. My requirements > a quite simple I just need to store some items and to get them at the end of > the analysis. > I've created the matrix with: > vect = pysparse.spmatrix.ll_mat(nelements, 1, size_hint) > > And now I want to get the items from the matrix. I could do: > items = vect.items() Not exactly what you ask, but you may try values, rows, cols = vect.find() which returns numpy arrays instead of tuples. > > The problem is that the created items is a list not an iterator. That consumes > a lot of extra memory just to access the matrix. Is this the expected > behaviour or am I missing something? > Best Regards, |
From: Jose B. <jb...@bt...> - 2009-09-04 12:10:12
|
Hi: I'm new to pyparse, thanks for doing this tool open source. I'm trying to store an sparse vector and to get the results. My requirements a quite simple I just need to store some items and to get them at the end of the analysis. I've created the matrix with: vect = pysparse.spmatrix.ll_mat(nelements, 1, size_hint) And now I want to get the items from the matrix. I could do: items = vect.items() The problem is that the created items is a list not an iterator. That consumes a lot of extra memory just to access the matrix. Is this the expected behaviour or am I missing something? Best Regards, -- Jose M. Blanca Postigo Instituto Universitario de Conservacion y Mejora de la Agrodiversidad Valenciana (COMAV) Universidad Politecnica de Valencia (UPV) Edificio CPI (Ciudad Politecnica de la Innovacion), 8E 46022 Valencia (SPAIN) Tlf.:+34-96-3877000 (ext 88473) |
From: Adam C P. IV <haz...@de...> - 2009-08-31 23:49:39
|
Thanks very much Dan! I'll package it soon. -Adam On Mon, 2009-08-31 at 18:47 -0400, Daniel Wheeler wrote: > Hi, > > I did a release of version 1.1 of pysparse, which involved: > > - bumping version number to 1.1 > - creating tags/version-1_1 branch > - releasing using the tags/version-1_1 branch > - bumping version number to 1.2a1 (just a way to say that you don't > have version 1,1 but a later revision on trunk) > > Future bug fixes should be done on "branches/version-1_1". > "tags/version-1_1" is just a place holder to remember which revision > version 1.1 was, it shouldn't be touched. > > There are a lot of changes from 1.0 and I don't know what all of them > are.I think the main difference between 1.1 and 1,0 is the vastly > superior indexing capabilities thanks to Dominque's wonderful effort > to get fancy type indexing working in pysparse. > > Cheers > > On Wed, Aug 5, 2009 at 3:29 PM, Adam C Powell IV<haz...@de...> wrote: > > On Wed, 2009-08-05 at 15:09 -0400, Daniel Wheeler wrote: > >> On Wed, Aug 5, 2009 at 2:02 PM, Adam C Powell IV<haz...@de...> wrote: > >> > Hi Dan, > >> > > >> > Yes, an official release would be helpful. Using SVN is generally a > >> > temporary thing, e.g. Elmer is hoping to release 6.0 this Fall, and is a > >> > complex package, so I wanted to use SVN to iron out the bugs before > >> > release. > >> > >> I see. You just need to iron out dependencies and stuff like that > > > > Yeah, that's not a problem. > > > >> > So if there's a 1.1.0 pysparse soon, I'll go ahead and package that. > >> > >> I'll do it soon and give you a heads up when it is done. This is going > >> into the Debian repositories correct? What about Ubuntu? > > > > Yes, into Debian. Ubuntu slurps Debian packages into their "universe" > > soon after release. So the Karmic universe is already well-established > > by now, and they'll only update packages if they are core to their > > release plans -- which pysparse almost certainly is not. > > > >> One other thing. Now that pysparse will be in the repositories (and > >> also trilinos in lenny and karmic), I don't think there is anything > >> stopping us going ahead with getting fipy in there. How should I > >> proceed with that? > > > > Indeed, that was my original motivation for packaging PySparse. :-) > > > > I'll revisit that after packaging the new PySparse release. > > > > -Adam -- GPG fingerprint: D54D 1AEE B11C CE9B A02B C5DD 526F 01E8 564E E4B6 Engineering consulting with open source tools http://www.opennovation.com/ |
From: Daniel W. <dan...@gm...> - 2009-08-31 22:47:39
|
Hi, I did a release of version 1.1 of pysparse, which involved: - bumping version number to 1.1 - creating tags/version-1_1 branch - releasing using the tags/version-1_1 branch - bumping version number to 1.2a1 (just a way to say that you don't have version 1,1 but a later revision on trunk) Future bug fixes should be done on "branches/version-1_1". "tags/version-1_1" is just a place holder to remember which revision version 1.1 was, it shouldn't be touched. There are a lot of changes from 1.0 and I don't know what all of them are.I think the main difference between 1.1 and 1,0 is the vastly superior indexing capabilities thanks to Dominque's wonderful effort to get fancy type indexing working in pysparse. Cheers On Wed, Aug 5, 2009 at 3:29 PM, Adam C Powell IV<haz...@de...> wrote: > On Wed, 2009-08-05 at 15:09 -0400, Daniel Wheeler wrote: >> On Wed, Aug 5, 2009 at 2:02 PM, Adam C Powell IV<haz...@de...> wrote: >> > Hi Dan, >> > >> > Yes, an official release would be helpful. Using SVN is generally a >> > temporary thing, e.g. Elmer is hoping to release 6.0 this Fall, and is a >> > complex package, so I wanted to use SVN to iron out the bugs before >> > release. >> >> I see. You just need to iron out dependencies and stuff like that > > Yeah, that's not a problem. > >> > So if there's a 1.1.0 pysparse soon, I'll go ahead and package that. >> >> I'll do it soon and give you a heads up when it is done. This is going >> into the Debian repositories correct? What about Ubuntu? > > Yes, into Debian. Ubuntu slurps Debian packages into their "universe" > soon after release. So the Karmic universe is already well-established > by now, and they'll only update packages if they are core to their > release plans -- which pysparse almost certainly is not. > >> One other thing. Now that pysparse will be in the repositories (and >> also trilinos in lenny and karmic), I don't think there is anything >> stopping us going ahead with getting fipy in there. How should I >> proceed with that? > > Indeed, that was my original motivation for packaging PySparse. :-) > > I'll revisit that after packaging the new PySparse release. > > -Adam > -- > GPG fingerprint: D54D 1AEE B11C CE9B A02B C5DD 526F 01E8 564E E4B6 > > Engineering consulting with open source tools > http://www.opennovation.com/ > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Pysparse-developers mailing list > Pys...@li... > https://lists.sourceforge.net/lists/listinfo/pysparse-developers > > -- Daniel Wheeler |
From: Dominique O. <dom...@gm...> - 2009-08-07 19:27:08
|
On Fri, Aug 7, 2009 at 2:42 PM, Jaim Bucay <Jai...@ra...> wrote: > Hi, I have never used Pysparse before. I would like to use it to create a > very large Sparse Matrix and find its Eigenvalues. Do you know where I can > get some simple examples of how to implement something like this. Thank you. If you look at http://pysparse.sf.net and follow the documentation, you will find several examples that will help you understand how to populate a sparse matrix with Pysparse. For the computation of eigenvalues, look into the jdsym module: http://pysparse.sourceforge.net/jdsym.html Be aware that this is a very expensive operation, especially if you need *all* eigenvalues. Often, you only need to find a few. -- Dominique |
From: Jaim B. <Jai...@ra...> - 2009-08-07 18:58:53
|
Hi, I have never used Pysparse before. I would like to use it to create a very large Sparse Matrix and find its Eigenvalues. Do you know where I can get some simple examples of how to implement something like this. Thank you. Jaim Bucay Post-Grad Student Tech. (520) 665-5837 |
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 |
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 |
From: Daniel W. <dan...@gm...> - 2008-12-03 20:46:13
|
This is a note to inform pysparse users that the pysparse CVS repository was today migrated to subversion. To checkout pysparse's trunk use $ svn co https://pysparse.svn.sourceforge.net/svnroot/pysparse/trunk Cheers -- Daniel Wheeler |
From: Daniel W. <dan...@gm...> - 2008-09-29 19:23:02
|
On Fri, Sep 26, 2008 at 9:42 PM, <dx...@my...> wrote: > Hi, > > I understand pysparse is updated to work with numpy (vs. old numeric) > since version 1.0. My question is, > > 1. Will ver 1.01 has the same syntax as ver 0.34? Essential, yes. The main difference is that everything is imported under the "pysparse" umbrella. You will have to change your code form >>> import pysparse_module to >>> import pysparse.pysparse_module as pysparse_module This change eradicated the name space pollution and cleaned up site-packages. > 2. Do I have to change my old code that works with ver 0.34 in order > to use ver 1.01 ? Yes as outlined above. > 3. Does ver 1.01 still work with numeric? Yes, at least it is designed to. You need to specify that you want to use Numeric in setup.py. > I've been using 0.34.032 and pretty happy with it, so I'm a little > worried the compatibility issues that may take place after upgrading > pysparse to ver 1.01. There is no added functionality so it may not be worth it. The changes were required to stay current with the rest of the scientific python community. -- Daniel Wheeler |
From: <dx...@my...> - 2008-09-27 02:06:29
|
Hi, I understand pysparse is updated to work with numpy (vs. old numeric) since version 1.0. My question is, 1. Will ver 1.01 has the same syntax as ver 0.34? 2. Do I have to change my old code that works with ver 0.34 in order to use ver 1.01 ? 3. Does ver 1.01 still work with numeric? I've been using 0.34.032 and pretty happy with it, so I'm a little worried the compatibility issues that may take place after upgrading pysparse to ver 1.01. Thanks, -DX |
From: Roman G. <rom...@gm...> - 2008-09-23 20:22:50
|
Hello pysparse only deals with double precision real numbers. The was a followup project called pysparse2, implemented with C++ templates that was intended to support arbitrary matrix element types. Unfortunately pysparse2 was never completed. So it's just doubles now. Regards, Roman Daniel Wheeler wrote: > Hi, > > As far as I know, I don't believe that pysparse was ever written to > deal with complex numbers. The original author of the code would > probably know better. I certainly am not aware that anyone has tried > making pysparse work with complex numbers. I do hear a lot of > discussion on the scipy list regarding sparse matrices and complex > numbers. Scipy sparse matrices almost certainly are fully configured > to deal with complex numbers so you might want to try that. Cheers > > On Sun, Sep 21, 2008 at 10:23 AM, 1 1 <gsh...@gm...> wrote: > >> ---------- Forwarded message ---------- >> From: 1 1 <gsh...@gm...> >> Date: 2008/9/21 >> Subject: Comlpex numbers >> To: if...@ma... >> >> >> This code: >> from pysparse import spmatrix >> print spmatrix.LLMatType # print complex >> a = spmatrix.ll_mat(1,1) >> a[0,0]=12j >> not work. Error: can't conver complex to float. >> Complex numbers do not work? >> Thanks. >> >> >> >> >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Pysparse-users mailing list >> Pys...@li... >> https://lists.sourceforge.net/lists/listinfo/pysparse-users >> >> >> > > > > |
From: Daniel W. <dan...@gm...> - 2008-09-23 14:01:32
|
Hi, As far as I know, I don't believe that pysparse was ever written to deal with complex numbers. The original author of the code would probably know better. I certainly am not aware that anyone has tried making pysparse work with complex numbers. I do hear a lot of discussion on the scipy list regarding sparse matrices and complex numbers. Scipy sparse matrices almost certainly are fully configured to deal with complex numbers so you might want to try that. Cheers On Sun, Sep 21, 2008 at 10:23 AM, 1 1 <gsh...@gm...> wrote: > > > ---------- Forwarded message ---------- > From: 1 1 <gsh...@gm...> > Date: 2008/9/21 > Subject: Comlpex numbers > To: if...@ma... > > > This code: > from pysparse import spmatrix > print spmatrix.LLMatType # print complex > a = spmatrix.ll_mat(1,1) > a[0,0]=12j > not work. Error: can't conver complex to float. > Complex numbers do not work? > Thanks. > > > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Pysparse-users mailing list > Pys...@li... > https://lists.sourceforge.net/lists/listinfo/pysparse-users > > -- Daniel Wheeler |
From: 1 1 <gsh...@gm...> - 2008-09-21 14:24:00
|
---------- Forwarded message ---------- From: 1 1 <gsh...@gm...> Date: 2008/9/21 Subject: Comlpex numbers To: if...@ma... This code: from pysparse import spmatrix print spmatrix.LLMatType # print complex a = spmatrix.ll_mat(1,1) a[0,0]=12j not work. Error: can't conver complex to float. Complex numbers do not work? Thanks. |
From: Daniel W. <dan...@gm...> - 2008-07-11 14:18:34
|
I had a similar problem with pytrilinos that required the swig interface to be fixed. It should work whatever int type is chosen. I might look into this at some point. Cheers. On Thu, Jul 10, 2008 at 6:11 AM, Artur Palha <art...@gm...> wrote: > Hello Daniel > > Once again I manage to solve the problem. > > When I was trying to make a simple program that mimics the problem I > have, to send you, as you asked, I found the problem. Maybe there is a > bug with pysparse or the problem is mine. > > The simplest program is: > > import numpy > import pysparse > > GN = numpy.array([0,1,2,3]) > > B = pysparse.spmatrix.ll_mat(10, 10, 10) > > for i in range(0,2): > B[GN[i], GN[i]] += 10 > > print B > > > If you do this it works. But if you use: > > GN = numpy.array([0,1,2,3], dtype="int32") > > It gives the error I stated. > > If one prints the dtype of GN of the first code, it states that it is > int64. Hence the problem is that one cannot give in32 as an index to a > ll_mat on a 64bit machine, or at least on mine. > > Once again thank you for your help! > > -artur palha > > On Wed, Jul 9, 2008 at 3:16 PM, Artur Palha <art...@gm...> wrote: >> Thank you for the help, again. >> >> The error it gives is: >> >> IndexError: first index is invalid >> >> And the error comes up when I try to assign a value to an entry of the >> B matrix in this way: >> >> B[ GN[e,n,m], GN[e,i,j] ] += something >> >> B is the sparse matrix and GN is a 3d array. >> >> I have checked that the values of GN are correct. The exact same code >> works on another machine. I even tried a simpler code and it gives the >> same error. The strange thing is that if I try to do it in ipython, >> line by line, it works. Even if I assign a the value of GN to another >> variable, as: >> >> a = GN[e,n,m] >> b = GN[e,i,j] >> >> and then try: >> >> B[a,b] += something >> >> it does not work also, or if I assing to a and b constant values as: >> >> a = 1 >> b = 2 >> >> B[a,b] += something >> >> It only works if I do: >> >> B[1,2] += something >> >> Any help? >> >> Thank you >> >> -artur palha >> >> On Thu, Jul 3, 2008 at 6:06 PM, Daniel Wheeler >> <dan...@gm...> wrote: >>> On Thu, Jul 3, 2008 at 8:50 AM, Artur Palha <art...@gm...> wrote: >>>> I hope someone can help me >>>> >>>> I am trying to compile pysparse on a 64 bit machine with openSuse 10.3. >>>> >>>> It compiles but gives an error acessing the sparse arrays. >>> >>> What is the error? I use pysparse on a 64 bit machine without problems. >>> >>>> I read on >>>> the README file that there is an incompatibility issue with pysparse >>>> and numpy on 64bit machines and that a patch is needed. >>> >>> According to the CVS log, the message was there from the initial >>> import of pysparse. I'll remove it. >>> >>>> I have >>>> installed version 1.1.0 of Numpy do I need the patch or the problem is >>>> somewhere else? >>> >>> Can you give some more details? >>> >>> -- >>> Daniel Wheeler >>> >> > -- Daniel Wheeler |
From: Artur P. <art...@gm...> - 2008-07-10 10:11:11
|
Hello Daniel Once again I manage to solve the problem. When I was trying to make a simple program that mimics the problem I have, to send you, as you asked, I found the problem. Maybe there is a bug with pysparse or the problem is mine. The simplest program is: import numpy import pysparse GN = numpy.array([0,1,2,3]) B = pysparse.spmatrix.ll_mat(10, 10, 10) for i in range(0,2): B[GN[i], GN[i]] += 10 print B If you do this it works. But if you use: GN = numpy.array([0,1,2,3], dtype="int32") It gives the error I stated. If one prints the dtype of GN of the first code, it states that it is int64. Hence the problem is that one cannot give in32 as an index to a ll_mat on a 64bit machine, or at least on mine. Once again thank you for your help! -artur palha On Wed, Jul 9, 2008 at 3:16 PM, Artur Palha <art...@gm...> wrote: > Thank you for the help, again. > > The error it gives is: > > IndexError: first index is invalid > > And the error comes up when I try to assign a value to an entry of the > B matrix in this way: > > B[ GN[e,n,m], GN[e,i,j] ] += something > > B is the sparse matrix and GN is a 3d array. > > I have checked that the values of GN are correct. The exact same code > works on another machine. I even tried a simpler code and it gives the > same error. The strange thing is that if I try to do it in ipython, > line by line, it works. Even if I assign a the value of GN to another > variable, as: > > a = GN[e,n,m] > b = GN[e,i,j] > > and then try: > > B[a,b] += something > > it does not work also, or if I assing to a and b constant values as: > > a = 1 > b = 2 > > B[a,b] += something > > It only works if I do: > > B[1,2] += something > > Any help? > > Thank you > > -artur palha > > On Thu, Jul 3, 2008 at 6:06 PM, Daniel Wheeler > <dan...@gm...> wrote: >> On Thu, Jul 3, 2008 at 8:50 AM, Artur Palha <art...@gm...> wrote: >>> I hope someone can help me >>> >>> I am trying to compile pysparse on a 64 bit machine with openSuse 10.3. >>> >>> It compiles but gives an error acessing the sparse arrays. >> >> What is the error? I use pysparse on a 64 bit machine without problems. >> >>> I read on >>> the README file that there is an incompatibility issue with pysparse >>> and numpy on 64bit machines and that a patch is needed. >> >> According to the CVS log, the message was there from the initial >> import of pysparse. I'll remove it. >> >>> I have >>> installed version 1.1.0 of Numpy do I need the patch or the problem is >>> somewhere else? >> >> Can you give some more details? >> >> -- >> Daniel Wheeler >> > |
From: Daniel W. <dan...@gm...> - 2008-07-09 14:13:46
|
Put the simplest script that you can together that demonstrates the problem and I'll try running it on a variety machines that we have here and perhaps see what is going on. Cheers. On Wed, Jul 9, 2008 at 9:16 AM, Artur Palha <art...@gm...> wrote: > Thank you for the help, again. > > The error it gives is: > > IndexError: first index is invalid > > And the error comes up when I try to assign a value to an entry of the > B matrix in this way: > > B[ GN[e,n,m], GN[e,i,j] ] += something > > B is the sparse matrix and GN is a 3d array. > > I have checked that the values of GN are correct. The exact same code > works on another machine. I even tried a simpler code and it gives the > same error. The strange thing is that if I try to do it in ipython, > line by line, it works. Even if I assign a the value of GN to another > variable, as: > > a = GN[e,n,m] > b = GN[e,i,j] > > and then try: > > B[a,b] += something > > it does not work also, or if I assing to a and b constant values as: > > a = 1 > b = 2 > > B[a,b] += something > > It only works if I do: > > B[1,2] += something > > Any help? > > Thank you > > -artur palha > > On Thu, Jul 3, 2008 at 6:06 PM, Daniel Wheeler > <dan...@gm...> wrote: >> On Thu, Jul 3, 2008 at 8:50 AM, Artur Palha <art...@gm...> wrote: >>> I hope someone can help me >>> >>> I am trying to compile pysparse on a 64 bit machine with openSuse 10.3. >>> >>> It compiles but gives an error acessing the sparse arrays. >> >> What is the error? I use pysparse on a 64 bit machine without problems. >> >>> I read on >>> the README file that there is an incompatibility issue with pysparse >>> and numpy on 64bit machines and that a patch is needed. >> >> According to the CVS log, the message was there from the initial >> import of pysparse. I'll remove it. >> >>> I have >>> installed version 1.1.0 of Numpy do I need the patch or the problem is >>> somewhere else? >> >> Can you give some more details? >> >> -- >> Daniel Wheeler >> > -- Daniel Wheeler |
From: Artur P. <art...@gm...> - 2008-07-09 13:16:12
|
Thank you for the help, again. The error it gives is: IndexError: first index is invalid And the error comes up when I try to assign a value to an entry of the B matrix in this way: B[ GN[e,n,m], GN[e,i,j] ] += something B is the sparse matrix and GN is a 3d array. I have checked that the values of GN are correct. The exact same code works on another machine. I even tried a simpler code and it gives the same error. The strange thing is that if I try to do it in ipython, line by line, it works. Even if I assign a the value of GN to another variable, as: a = GN[e,n,m] b = GN[e,i,j] and then try: B[a,b] += something it does not work also, or if I assing to a and b constant values as: a = 1 b = 2 B[a,b] += something It only works if I do: B[1,2] += something Any help? Thank you -artur palha On Thu, Jul 3, 2008 at 6:06 PM, Daniel Wheeler <dan...@gm...> wrote: > On Thu, Jul 3, 2008 at 8:50 AM, Artur Palha <art...@gm...> wrote: >> I hope someone can help me >> >> I am trying to compile pysparse on a 64 bit machine with openSuse 10.3. >> >> It compiles but gives an error acessing the sparse arrays. > > What is the error? I use pysparse on a 64 bit machine without problems. > >> I read on >> the README file that there is an incompatibility issue with pysparse >> and numpy on 64bit machines and that a patch is needed. > > According to the CVS log, the message was there from the initial > import of pysparse. I'll remove it. > >> I have >> installed version 1.1.0 of Numpy do I need the patch or the problem is >> somewhere else? > > Can you give some more details? > > -- > Daniel Wheeler > |
From: Daniel W. <dan...@gm...> - 2008-07-03 16:06:05
|
On Thu, Jul 3, 2008 at 8:50 AM, Artur Palha <art...@gm...> wrote: > I hope someone can help me > > I am trying to compile pysparse on a 64 bit machine with openSuse 10.3. > > It compiles but gives an error acessing the sparse arrays. What is the error? I use pysparse on a 64 bit machine without problems. > I read on > the README file that there is an incompatibility issue with pysparse > and numpy on 64bit machines and that a patch is needed. According to the CVS log, the message was there from the initial import of pysparse. I'll remove it. > I have > installed version 1.1.0 of Numpy do I need the patch or the problem is > somewhere else? Can you give some more details? -- Daniel Wheeler |
From: Artur P. <art...@gm...> - 2008-07-03 12:50:40
|
I hope someone can help me I am trying to compile pysparse on a 64 bit machine with openSuse 10.3. It compiles but gives an error acessing the sparse arrays. I read on the README file that there is an incompatibility issue with pysparse and numpy on 64bit machines and that a patch is needed. I have installed version 1.1.0 of Numpy do I need the patch or the problem is somewhere else? Thanking in advance. Best regards -artur palha |
From: gorkiana m. <gor...@gm...> - 2008-06-23 09:15:08
|
Dominique, Yes, I noticed that, I also made some changes because it asked numerix which was inside Fipy. Thank you. But yet I could not use it. Nevertheless I managed to solve my problem during this weekend. Basically pysparse.spmatrix.ll_mat objects have two methods: keys() and values() With this two it is possible to do what I want. This is what I did: A = pysparse.spmatrix.ll_mat(10,10) # a 10 x 10 sparse matrix X = numpy.arange(0,10) # a dense vector of length 10 A[0,1] = 10; A[0,2] = 10; A[0,3] = 10 To add the first row of A to X one just needs to do the following: A_indices = numpy.array(A[0,:].keys())[:,1] # keys is a list of tuples, so converting to numpy.array yelds a matrix # the first column is the row index and the second column the column index # we just need the column index # we get a vector with the indices where A has nonzero values at row 0 A_values = numpy.array(A[0,:].values()) # the nonzero values of row 0 X[A_indices] = X[A_indices] + A_values Simple! Thank you very much Dominique and Daniel for your help. Probably I will have more looks at FiPy because I will have more problems for sure! -artur palha On Sat, Jun 21, 2008 at 2:58 PM, Dominique Orban <dom...@gm...> wrote: > Artur, > > On top of the file that Daniel sent, you also need sparseMatrix.py > which you can download from the repository Daniel mentioned earlier. I > also attach it below. > > Good luck, > Dominique > > On Fri, Jun 20, 2008 at 10:09 AM, Daniel Wheeler > <dan...@gm...> wrote: > > On Fri, Jun 20, 2008 at 6:50 AM, Artur Palha <art...@gm...> > wrote: > >> Thank you for your help Daniel > > > > No problem. > > > >> I have downloaded it but it is asking for more modules from your > project. > > > > Yes. I realized that Dominique Orban created a version of this that > > works with pysparse alone. See attachment. It really needs to be > > integrated into pysparse properly. I just haven't had a chance yet. > > > >> I will try to have a look and see if I can do something based on what > >> you did. In the meantime I will also have a look a pyTrilinos. > > > > Try scipy as well. > > > > -- > > Daniel Wheeler > > > > ------------------------------------------------------------------------- > > Check out the new SourceForge.net Marketplace. > > It's the best place to buy or sell services for > > just about anything Open Source. > > http://sourceforge.net/services/buy/index.php > > _______________________________________________ > > Pysparse-users mailing list > > Pys...@li... > > https://lists.sourceforge.net/lists/listinfo/pysparse-users > > > > > |
From: Dominique O. <dom...@gm...> - 2008-06-21 13:04:54
|
Artur, On top of the file that Daniel sent, you also need sparseMatrix.py which you can download from the repository Daniel mentioned earlier. I also attach it below. Good luck, Dominique On Fri, Jun 20, 2008 at 10:09 AM, Daniel Wheeler <dan...@gm...> wrote: > On Fri, Jun 20, 2008 at 6:50 AM, Artur Palha <art...@gm...> wrote: >> Thank you for your help Daniel > > No problem. > >> I have downloaded it but it is asking for more modules from your project. > > Yes. I realized that Dominique Orban created a version of this that > works with pysparse alone. See attachment. It really needs to be > integrated into pysparse properly. I just haven't had a chance yet. > >> I will try to have a look and see if I can do something based on what >> you did. In the meantime I will also have a look a pyTrilinos. > > Try scipy as well. > > -- > Daniel Wheeler > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Pysparse-users mailing list > Pys...@li... > https://lists.sourceforge.net/lists/listinfo/pysparse-users > > |
From: Daniel W. <dan...@gm...> - 2008-06-20 14:09:10
|
On Fri, Jun 20, 2008 at 6:50 AM, Artur Palha <art...@gm...> wrote: > Thank you for your help Daniel No problem. > I have downloaded it but it is asking for more modules from your project. Yes. I realized that Dominique Orban created a version of this that works with pysparse alone. See attachment. It really needs to be integrated into pysparse properly. I just haven't had a chance yet. > I will try to have a look and see if I can do something based on what > you did. In the meantime I will also have a look a pyTrilinos. Try scipy as well. -- Daniel Wheeler |
From: Artur P. <art...@gm...> - 2008-06-20 10:50:05
|
Thank you for your help Daniel I have downloaded it but it is asking for more modules from your project. I will try to have a look and see if I can do something based on what you did. In the meantime I will also have a look a pyTrilinos. Thank you once again. -artur palha On Tue, Jun 17, 2008 at 11:33 AM, Artur Palha <art...@gm...> wrote: > Hi to you all, I hope someone can help me. > > I am trying to do the following with pysparse but I am having problems doing it. > > I have a dense vector, say: > > x = numpy.arange(0,10) > > and a sparse matrix: > > A = pysparse.spmatrix.ll_mat(10,10) > > What I wish to do is: > > x = x + A[:, 2] > > But this gives the following error: > TypeError: unsupported operand type(s) for +: 'float' and 'll_mat' > > Then I tried like this: > > x = numpy.arange(0,10) > > A = pysparse.sparray.sparray((10,10)) > > With this it works ok but then, when I try to do a slice: > > A_reduced = A[0:5, 0:5] > > It gives an error: > TypeError: unsupported operand type(s) for +: 'int' and 'slice' > > Anybody can give a help? > > Also, what is the main difference between spmatrix and sparray? > > Thanking in advance > > Best regards > > -artur palha > |