[SciPy-user] Scipy Sparse Library

Nathan Bell wnbell@gmail....
Sat Jan 26 08:07:59 CST 2008


On Jan 25, 2008 9:59 PM, Dinesh B Vadhia <dineshbvadhia@hotmail.com> wrote:
>
> We built a working C++ program using the SparseLib++ library last year.  We
> are now creating a Python version of the program using the Scipy sparse
> library (the csc matrix format) and the results of the program are very
> different to the C++ program.  It's either the Python program or the data.
> We have checked the programs and the data and cannot identify any
> discrepencies.
>
> Is it possible that the Scipy sparse libraries behave differently from the
> SparseLib++ library?  I would have said unlikely but I guess anything is
> possible.

Can you tell us what sparse functionality you are using and which
version of SciPy you have?  Can you produce a short script that
demonstrates the problem?

SciPy sparse arithmetic should produce the same results as
SparseLib++.  The only case when this may not be true is when the
entries of your matrix have drastically varying values (e.g. 1e-10 vs
1e10) and the lack of associativity in floating math produces
different results.

-- 
Nathan Bell wnbell@gmail.com
http://graphics.cs.uiuc.edu/~wnbell/


More information about the SciPy-user mailing list