-
Notifications
You must be signed in to change notification settings - Fork 205
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Milestone
Description
The code
import mpmath
mpmath.quadosc(
mpmath.airyai,
[-mpmath.inf, 0],
zeros=lambda n: -mpmath.airyaizero(-n),
)
yields
[/usr/local/lib/python3.8/dist-packages/mpmath/calculus/quadrature.py](https://localhost:8080/#) in quadosc(ctx, f, interval, omega, period, zeros)
992 if not zeros:
993 if omega:
--> 994 period = 2*ctx.pi/omega
995 zeros = lambda n: n*period/2
996 #for n in range(1,10):
TypeError: unsupported operand type(s) for /: 'mpf' and 'function'
I think that zeros are regarded as a positional argument in the line 987 of quadrature.py
if a == ctx.ninf:
if zeros:
return ctx.quadosc(lambda x:f(-x), [-b,-a], lambda n: zeros(-n))
and are messed with omega.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior