On 10 November 2011 00:21, Raoul <[email protected]> wrote:

> Hi,
>
> > > *concerning sums:
> > > *In [1]: s = summation(k**(-x),(k,1,oo))
> > >
> > > In [2]: s
> > > Out[2]:
> > >
> > >   ∞
> > >  ___
> > >  \  `
> > >   \    -x
> > >   /   k
> > >  /__,
> > > k = 1
> > >
> > > In [3]: fs = lambdify([x], s) # I've added a print statement inside
> > > so I can see the lambda string
> > > lambda x: (Sum(k**(-x), (k, 1, oo)))
> > >
> > > In [4]: fs(2)
> > > /usr/lib/pymodules/python2.7/numpy/__init__.pyc in <lambda>(x)
> > >
> > > NameError: global name 'Sum' is not defined
>
> I suppose the function "Sum" just is not "translated" to
> lamdified numpy/mpmath/... code.
>
> Yes, it is not translated and that is posing a problem.


> Further there is probably no equivalent to symbolic
> infinite sums.
>
There is - the approximation used in evalf().

>
> What would this sum be, for example in numerical code?
>

-- 
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