Status: New
Owner: ----
New issue 237 by
photon.e...@gmail.com: Changing limit of quadosc to -inf
causes TypeError
http://code.google.com/p/mpmath/issues/detail?id=237
- What steps will reproduce the problem?
This is the example taken from the documentation page on quadratures, with
three additional lines added:
from mpmath import *
mp.dps = 15; mp.pretty = True
f = lambda x: sin(3*x)/(x**2+1)
quadosc(f, [0,inf], omega=3)
quadosc(f, [0,inf], period=2*pi/3)
quadosc(f, [0,inf], zeros=lambda n: pi*n/3)
quadosc(f, [-inf,0], omega=3)
quadosc(f, [-inf,0], period=2*pi/3)
quadosc(f, [-inf,0], zeros=lambda n: pi*n/3)
- What is the expected output? What do you see instead?
All lines run perfectly, except for the last which outputs:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/mpmath/calculus/quadrature.py", line
985, in quadosc
return ctx.quadosc(lambda x:f(-x), [-b,-a], lambda n: zeros(-n))
File "/usr/lib/python3/dist-packages/mpmath/calculus/quadrature.py", line
992, in quadosc
period = 2*ctx.pi/omega
TypeError: unsupported operand type(s) for /: 'mpf' and 'function'
- What version of the product are you using? On what operating system?
Ubuntu 12.10
Python 3.3.1rc1 (default, Mar 26 2013, 18:27:31) (installed via raring
universe)
mpmath 0.17 (installed via raring universe)
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings