[Scipy-tickets] [SciPy] #470: iterative solver should not overwrite the initial guess ?

SciPy scipy-tickets@scipy....
Thu Jul 26 23:31:00 CDT 2007


#470: iterative solver should not overwrite the initial guess ?
--------------------+-------------------------------------------------------
 Reporter:  cdavid  |        Owner:  somebody
     Type:  task    |       Status:  new     
 Priority:  normal  |    Milestone:          
Component:  Other   |      Version:          
 Severity:  minor   |   Resolution:          
 Keywords:          |  
--------------------+-------------------------------------------------------
Comment (by wnbell):

 Personally, I find it counterintuitive that an input parameter is modified
 in-place since the solution is always returned as an output.  I don't
 believe it requires a significant change either, simply replace

 {{{
     x = x0
     if x is None:
         x = sb.zeros(n)
 }}}

 with

 {{{
     if x is None:
         x = sb.zeros(n)
     else:
         x = array(x0)
 }}}


 Is there a standard SciPy convention when a function takes an initial
 solution?

-- 
Ticket URL: <http://projects.scipy.org/scipy/scipy/ticket/470#comment:1>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list