[SciPy-user] Simpson bug?

Peter Bienstman Peter.Bienstman at ugent.be
Wed Jun 7 06:36:31 CDT 2006


Hi,

There seems to be an inconsistency in the Simpson quadrature routines (in 
0.4.8). Depending on whether the number of points is odd or even, you get a 
scalar or an array as result:

import scipy.integrate

>>print scipy.integrate.simps([1,2,3])

4.0

>>print scipy.integrate.simps([1,2,3,4])

[ 7.5]

Cheers,

Peter

-- 
------------------------------------------------
Peter Bienstman
Ghent University, Dept. of Information Technology
Sint-Pietersnieuwstraat 41, B-9000 Gent, Belgium
tel: +32 9 264 34 46, fax: +32 9 264 35 93
WWW: http://photonics.intec.UGent.be
email: Peter.Bienstman at UGent.be
------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 309 bytes
Desc: not available
Url : http://www.scipy.net/pipermail/scipy-user/attachments/20060607/2973e551/attachment.bin


More information about the SciPy-user mailing list