From: Dominique O. <dom...@gm...> - 2010-03-26 08:01:49
|
On Thu, Mar 25, 2010 at 4:11 PM, Rob Speer <rs...@mi...> wrote: > Thanks for figuring out the include thing! > > You should put setuptools in a try/except block. Remember, I want > users to automatically pull in pysparse as a dependency, so they > wouldn't have an option to stop the process between downloading and > installing pysparse to edit a file. And when pip installs something > from SVN instead of from PyPI, it insists on 'setup.py develop'. > > It's fortunate that pip can force setuptools to be imported, but we > shouldn't rely on that behavior. > > Unrelatedly, I've just noticed a bug in the PysparseMatrix class. It > has a .matvec method that doesn't meet NumPy's requirements (because > it returns its result, instead of writing it into another array). > Currently I work around it by using .matrix.matvec, which does the > right thing, but it would be nice if this worked better. Would it make > sense for me to have SVN access so I can fix minor things like this? I did try to wrap 'import setuptools' in a try/except but that had consequences when I did simple 'python setup.py install'. It created new directories and eggs. I'd rather leave it up to the user unless there is a strong consensus otherwise. The matvec behavior is the intended behavior. The whole idea of the PysparseMatrix class is that it is "easy" and "natural" to use. Amongst other things, that means you can say y=A*x instead of A.matvec(x,y). The savvy user will notice (as you did) that ll_mat objects are more efficient and will use those. The typical user will use the PysparseMatrix class. -- Dominique |