[Scipy-tickets] [SciPy] #302: romb fails to complete integration

SciPy scipy-tickets at scipy.net
Sun Nov 5 04:47:31 CST 2006


#302: romb fails to complete integration
-----------------------------+----------------------------------------------
 Reporter:  jmlloren         |       Owner:  somebody
     Type:  defect           |      Status:  new     
 Priority:  normal           |   Milestone:          
Component:  scipy.integrate  |     Version:          
 Severity:  critical         |    Keywords:          
-----------------------------+----------------------------------------------
 When one tries to accomplish a simple integration with romb function in
 scipy.integrate.quadrature module, python reports an error. For example:

 {{{
 import numpy as N
 import scipy.integrate as Int

 A=N.array([N.sin(i*2*N.pi/float(NP-1)) for i in range(NP)])
 h=2*N.pi/float(NP-1)
 Int.romb(A,h,axis=0,show=False)
 }}}

 Python reports:
   File "<stdin>", line 1, in ?
   File "/usr/lib/python2.4/site-packages/scipy/integrate/quadrature.py",
 line 258, in romb
     slice_R = tupleset(slice_R, slice(start,stop,step))
 TypeError: tupleset() takes exactly 3 arguments (2 given)

 Indeed, when
 {{{
 slice_R = tupleset(slice_R, slice(start,stop,step))
 }}}
 is replaced by
 {{{
 slice_R = tupleset(slice_R, axis, slice(start,stop,step))
 }}}
 the integration finishes successfully.

 Cheers.
 Jose

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


More information about the Scipy-tickets mailing list