From: Daniel W. <dan...@ni...> - 2007-01-02 20:29:46
|
The changes for compatibility with numpy have now been merged back onto HEAD. I will do a new release in the near future. Cheers On Dec 21, 2006, at 12:36 PM, Daniel Wheeler wrote: > Numeric is dying slowly and being replaced by numpy. > With this in mind, I have updated pysparse to use the new numpy, > this is all on a branch at the moment. > It was straightforward matter of changing the imported header files > from Numeric's to numpy's. I am sending this email > to check to see if everybody is happy with the changes that have > been made. If there are no objections, I can merge back > onto the trunk and maybe make a new release. Changes and issues > are as follows: > > - Created a C macro defined from setup.py that either imports > numpy's or Numeric's headers depending > on the flag "use_numpy". The C macro was confusing me for > awhile, but I think it works > now. > > - I have changed the name space of itsolvers, spmatrix, jdsym > etc to all lie under pysparse. So, instead of > > >>> import spmatrix > > you do > > >>> from pysparse import spmatrix > > This change stops site-packages from being polluted. At the > moment the branch version is using pysparse_numpy > or pysparse_Numeric as the pysparse name space for testing > purposes. > > - The branch can be checked out via: > > $ cvs -d:ext:ui...@py...:/cvsroot/pysparse > co -r branch-numpy pysparse > > - I have updated the Examples and Test directories to import > from pysparse. They all seem to work apart from stuff that was > broken already. > > - I got rid of pysparse_version.py and replaced it with an > __init__.py in Lib, which does the imports and holds a __version__ > variable. > So you can now do: > > >>> import pysparse_numpy > >>> print pysparse_numpy.__version__ > 0.34.032-numpy > > - I think the default flag should be use_numpy=True since most > users will now be getting numpy rather than Numeric. This could > be automated with a try and except, which tests for the > availability of numpy or Numeric. What do you think? > > - You can diff from your working copy of pysparse with "cvs > diff -c -r branch-numpy" to check the changes. > > - Is it worth bumping the version number of pysparse to 1.0, > since we will be breaking the name space (interface change)? > > - If you are compiling against numpy, the numpy header files > don't seem to be going into the right place at least on my two > computers. > I haven't resolved this problem yet. For now, I was just > copying the .h files from .../site-packages/python/numpy/core/ > include/ to Include/Lib/numpy > in my working copy of pysparse. > > Merry Christmas! > > -- > Daniel Wheeler > > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV________________________________ > _______________ > Pysparse-users mailing list > Pys...@li... > https://lists.sourceforge.net/lists/listinfo/pysparse-users -- Daniel Wheeler |