On Jun 17, 3:50 pm, Neal Becker <[email protected]> wrote:
> I'm using current releases (pypi) of sympy and mpmath.
>
> res = quad (F2 (sigma, fadedB=opt.fade, n=n), [0, T])
> ...
> class F2 (object):
>     def __init__ (self, sigma, fadedB=0, n=4):
>         self.s = 10**(-0.05 * fadedB)
>         self.sigma = sigma
>         self.n = n
>     def __call__ (self, u):
>         return 1/(2 * self.sigma**2) * (u/(self.s**2))**((self.n-2)/4) * exp
> (-((self.s - sqrt (u))**2)/(2*self.sigma**2)) * ive (self.n/2-1, sqrt (u) *
> self.s / self.sigma**2)
>
> Traceback (most recent call last):
>   File "pf.py", line 111, in <module>
>     t, pf, pm = plot_vs_nchunks()
>   File "pf.py", line 83, in plot_vs_nchunks
>     res = quad (F2 (sigma, fadedB=opt.fade, n=n), [0, T])
>   File "/usr/lib/python2.6/site-packages/mpmath-0.12-
> py2.6.egg/mpmath/quadrature.py", line 731, in quad
>     v, err = rule.summation(f, points[0], prec, epsilon, m, verbose)
>   File "/usr/lib/python2.6/site-packages/mpmath-0.12-
> py2.6.egg/mpmath/quadrature.py", line 236, in summation
>     results.append(self.sum_next(f, nodes, degree, prec, results, verbose))
>   File "/usr/lib/python2.6/site-packages/mpmath-0.12-
> py2.6.egg/mpmath/quadrature.py", line 308, in sum_next
>     S += fdot((w,f(x)) for (x,w) in nodes)
>   File "/usr/lib/python2.6/site-packages/mpmath-0.12-
> py2.6.egg/mpmath/mptypes.py", line 596, in fdot
>     for a, b in A:
>   File "/usr/lib/python2.6/site-packages/mpmath-0.12-
> py2.6.egg/mpmath/quadrature.py", line 308, in <genexpr>
>     S += fdot((w,f(x)) for (x,w) in nodes)
>   File "pf.py", line 49, in __call__
>     return 1/(2 * self.sigma**2) * (u/(self.s**2))**((self.n-2)/4) * exp
> (-((self.s - sqrt (u))**2)/(2*self.sigma**2)) * ive (self.n/2-1, sqrt (u) *
> self.s / self.sigma**2)
>   File "/usr/lib/python2.6/site-packages/mpmath-0.12-
> py2.6.egg/mpmath/functions.py", line 109, in g
>     args = [mp.mpmathify(z) for z in args]
> AttributeError: 'MultiPrecisionArithmetic' object has no attribute 'mpmathify'

Looks like the funcwrapper decorator was accidentally broken. Try
doing import mpmath; mpmath.mp.mpmathify = mpmath.mp.convert as a
workaround.

Fredrik
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to