[Scipy-tickets] [SciPy] #720: SciPy's ``cumtrapz`` duplicates NumPy's ``trapz``

SciPy Trac scipy-tickets@scipy....
Sat Nov 27 09:04:12 CST 2010


#720: SciPy's ``cumtrapz`` duplicates NumPy's ``trapz``
------------------------------+---------------------------------------------
  Reporter:  aisaac           |       Owner:  somebody
      Type:  task             |      Status:  closed  
  Priority:  low              |   Milestone:          
 Component:  scipy.integrate  |     Version:          
Resolution:  invalid          |    Keywords:          
------------------------------+---------------------------------------------
Changes (by rgommers):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 trapz and cumtrapz are not the same (see below), and cumtrapz is less than
 10 lines long. So closing this ticket.

 {{{
 In [5]: import scipy.integrate as igt

 In [8]: a = np.arange(10)

 In [9]: igt.cumtrapz(a)
 Out[9]: array([  0.5,   2. ,   4.5,   8. ,  12.5,  18. ,  24.5,  32. ,
 40.5])

 In [10]: np.trapz(a)
 Out[10]: 40.5

 In [11]: igt.trapz(a)
 Out[11]: 40.5

 This is numpy-1.4.1 and scipy-0.7.2.
 }}}

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


More information about the Scipy-tickets mailing list