[Scipy-tickets] [SciPy] #384: TypeError: argument 2 must be list, not numpy.ndarray

SciPy scipy-tickets@scipy....
Sun Aug 19 10:11:45 CDT 2007


#384: TypeError: argument 2 must be list, not numpy.ndarray
----------------------------+-----------------------------------------------
 Reporter:  nils            |        Owner:  somebody
     Type:  enhancement     |       Status:  closed  
 Priority:  normal          |    Milestone:  0.6     
Component:  scipy.optimize  |      Version:  devel   
 Severity:  normal          |   Resolution:  fixed   
 Keywords:                  |  
----------------------------+-----------------------------------------------
Comment (by dmitrey):

 so the problem was
 ... = fmin_tnc(func, x, ...)
 earlier tnc required x to be Python list, not numpy.ndarray.
 I added line
 x = asfarray(x).tolist()
 So now tnc works with both python list (see
 /optimize/tests/test_optimize.py, funcs test3fg, test4fg and others) and
 numpy.ndarray (func test38fg from same file)

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


More information about the Scipy-tickets mailing list