#12 itsolvers initial guess

open
nobody
None
5
2011-12-19
2011-12-19
Anonymous
No

In the Pysparse documentation, chapter 5 Iterative Solvers example, the initial guess is
x = numpy.empty(n*n)

For small n (e.g. under 100) it is possible that x is all NaN, resulting a NaN solution

x = numpy.ones(n*n)
creates a more reliable initial solution for iterative solvers

Discussion