Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1381 by zorg724: error with mpmath documentation
http://code.google.com/p/sympy/issues/detail?id=1381

Exemple:
>>> mp.dps = 15
>>> print sumem(lambda n: 1/n**2, 1, inf)
>>> print sumem(lambda n: 1/n**2, 1, inf)
Traceback (most recent call last):
   File "<interactive input>", line 1, in <module>
   File "C:\fbtool\Python25\Lib\site-packages\mpmath\settings.py", line 130,
in g
     v = f(*args, **kwargs)
   File "C:\fbtool\Python25\Lib\site-packages\mpmath\calculus.py", line 448,
in sumem
     a, b = AS_POINTS(interval)
TypeError: unpack non-sequence


http://docs.sympy.org/modules/mpmath/summation.html#euler-maclaurin-summation-sumem


The code shall be:
  print sumem(lambda n: 1/n**2, [1, inf])

its seems that a lot of page of mpmath are KO (see Tanh-sinh quadrature
(quadts)ΒΆ, etc ..)
>>> print quadts(sin, 0, pi)
Traceback (most recent call last):
   File "<interactive input>", line 1, in <module>
   File "C:\fbtool\Python25\Lib\site-packages\mpmath\quadrature.py", line
428, in quadts
     return quad(*args, **kwargs)
   File "C:\fbtool\Python25\Lib\site-packages\mpmath\quadrature.py", line
390, in quad
     points[0], prec, epsilon, m, verbose)
   File "C:\fbtool\Python25\Lib\site-packages\mpmath\quadrature.py", line
119, in summation
     for i in xrange(len(points)-1):
TypeError: object of type 'int' has no len()


the code shall be : >>> print quadts(sin, [0, pi])
2.0

the version used is:
>>> mpmath.__version__
'0.10'

Mr Zorgi

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-issues" 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-issues?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to