The following code was run using sympy version 1.0, python version 3.4,
Anaconda installation.
import sympy as spy
import sympy.abc as abc
N, k = spy.symbols('N, k', positive = True)
es = 1 - (1 - 1/(2*N))**k
e = 2*N*es
spy.pprint(e)
c0 = spy.limit(e, N, spy.oo)
spy.pprint(c0)
c1 = spy.limit(N
Sure I will. The bug is still present in version 1.1.1 of sympy (Python
3.6).
On Monday, October 16, 2017 at 1:26:13 PM UTC-4, Aaron Meurer wrote:
>
> This looks like a bug. Can you open an issue for it?
>
> Aaron Meurer
>
> On Mon, Oct 16, 2017 at 10:15 AM, >
> wrote:
> > The following cod
The code below is run in Python 3.6 (Anaconda install), sympy 1.1.1:
#!/usr/bin/env python
import sympy as spy
import sympy.abc as abc
from sympy import pprint
n = abc.n
N = abc.N
EY = 2*N*(1-(1-1/(2*N))**n)
pprint(n-EY)
print('-'*80, '\n')
pprint((n-EY).series(N, x0=spy.oo).simplify())
print('-'
To factor/simplify, each term the best way appears to be to use collect and
pass the simplification function as an argument. So I can use the following
syntax:
spy.collect((n-EY).series(N,x0 = spy.oo).removeO(),N, spy.factor)
Only the part about a possible bug in sympy.simplify() stands.
On
To factor/simplify each term, the best way appears to be to use collect and
pass the simplification function as an argument. So I can use the following
syntax:
spy.collect((n-EY).series(N,x0 = spy.oo).removeO(),N, spy.factor)
It would be really nice if sympy can support collect() as a member fu
I tried to use the assumptions module in sympy as follows:
import sympy as spy
import numpy as np
import sympy.abc as abc
pprint = spy.pprint
lm = spy.symbols('lambda0:5', positive=True)
t = spy.symbols('t0:5', positive=True)
t = np.array(t, dtype=object)
t[0] = None
alpha = spy.symbols('alpha', p
ressions. You could also do f1.subs(Ne(lm[0],
> lm[1]), True).
>
> We definitely want for SymPy to be smarter here, but it's something
> that needs to be worked on still.
>
> Aaron Meurer
>
> On Wed, Jul 17, 2019 at 10:26 AM Divakar Viswanath > wrote:
> >
&