from sympy import *
n = symbols("n")
limit_seq(((-1) ** n) / n, n)limit_seq implements a special algorithm for computing limits of sequences. In this case I guess it wasn't able to compute the limit so it returned None. I agree this probably should not be public as it can be confusing like in this case. We should offer only limit as the public function. I will send in a PR.
limit_seq looks like it is an internal function for the series module.
I'm not sure why it's exposed to the public API. Maybe Sartaj can
comment. The function you want is limit((-1)**n/n, n, oo).
Unfortunately, that doesn't seem to work (it gives
NotImplementedError).
Aaron Meurer
On Fri, Nov 4, 2016 at 2:10 AM, Frunobulax <nha...@gmail.com> wrote:
> Hello everyone,
>
> I would have expected that the following code returns zero, but instead it
> gives me None. Is there something I am missing?
>
> from sympy import *
> n = symbols("n")
> limit_seq(((-1) ** n) / n, n)
>
> Thanks,
> Edi.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+unsubscribe@googlegroups.com.