[SciPy-User] integrate.quad out of center

josef.pktd at gmail.com josef.pktd at gmail.com
Wed Jan 15 20:00:48 EST 2014


FYI or JAR: integrate.quad with infinite bounds doesn't always find
the relevant range.

>>> f = lambda x: float((100 <= x) & (x <= 250))
>>> integrate.quad(f, -np.inf, np.inf)
(0.0, 0.0)

>>> integrate.quad(f, 0, 500)
(150.00000000000006, 1.6653345369377353e-13)

Josef
JAR: http://i.imgur.com/pspS3hj.jpg
- Don't forget to feed the ...!
- I know, I know.



More information about the SciPy-User mailing list