Re: [sympy] Introduction and a question

2019-03-22 Thread Chris Smith
Perhaps the loosely connected components could be identified in some canonical way. #16225 On Wednesday, March 13, 2019 at 2:11:00 PM UTC-5, Aaron Meurer wrote: > > If you follow the StackOverflow links at >

Re: [sympy] Introduction and a question

2019-03-13 Thread Aaron Meurer
If you follow the StackOverflow links at https://github.com/sympy/sympy/issues/11869 you can see some suggestions on how to do this sort of thing. Aaron Meurer On Sun, Mar 10, 2019 at 12:56 AM Mark Juers wrote: > > I'm a 4th-year PhD student in evolutionary biology at Indiana University in >

Re: [sympy] Introduction and a question

2019-03-10 Thread Oscar Benjamin
There probably is a better way of doing this in your problem but I just want to point out a way to "manually" extract parts of an expression. Let's create an expression with a few parts: In [1]: a, b, c, x = symbols('a b c x') In [2]: p = a*x**2 + b*x + c In [3]: r1, r2 = solve(p, x) In [4]:

Re: [sympy] Introduction and a question

2019-03-10 Thread Mark Juers
In my real problem, d is an arbitrarily complex expression I'd rather not type out in full, and the factored part is inside a subexpression, so I'm not sure I could get this to work. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe

Re: [sympy] Introduction and a question

2019-03-10 Thread Oscar Benjamin
I'm not sure if this would work for your real problem but for this example you can do: In [8]: factor(test-d)+d Out[8]: d - (a - b)⋅(c - 1) On Sun, 10 Mar 2019 at 07:56, Mark Juers wrote: > > I'm a 4th-year PhD student in evolutionary biology at Indiana University in > Bloomington, IN. I've

[sympy] Introduction and a question

2019-03-09 Thread Mark Juers
I'm a 4th-year PhD student in evolutionary biology at Indiana University in Bloomington, IN. I've been using Python for about a year for various biology projects and am working on a package related to my dissertation work. I am looking to replace Mathematica with SymPy in my workflow. I use