[sympy] Re: behavior of asec()

2021-04-09 Thread 'B A' via sympy
My previous message can be ignored -- as Aaron pointed out (thank you!) this has been fixed, I was not using a recent-enough release. Sorry for the noise. Python 3.9.2 (default, Mar 31 2021, 11:25:52) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or

[sympy] Profiling functions

2021-04-09 Thread Shri Keshavinee
Hi, I'm writing a proposal on the following project "Classical Mechanics: Efficient Equation of Motion Generation with Python". As a first step, I would like to contribute to it by finding where the functions are getting slower through python profiling and add this as a pull request. But I'm

Re: [sympy] Profiling functions

2021-04-09 Thread Oscar Benjamin
On Fri, 9 Apr 2021 at 13:35, Shri Keshavinee wrote: > > I'm writing a proposal on the following project "Classical Mechanics: > Efficient Equation of Motion Generation with Python". As a first step, I > would like to contribute to it by finding where the functions are getting > slower through

[sympy] Re: How to change/influence the dependent/independent variables from solve

2021-04-09 Thread brandon...@gmail.com
Thank you! This almost worked for me as is. My desired dependent variables are [w, y]. If I just pass those, then I don't get the solution for z=1. So I did two solves: 1. Solve with my desired dependent variables (e.g. [w, y]) 2. Identify the set of variables that are not in the solution (as

[sympy] SymPy 1.8 released

2021-04-09 Thread Oscar Benjamin
Hi all, It is my pleasure to announce the final release of SymPy 1.8. The wheel and sdist files for this release are already uploaded to pypi. You can install sympy 1.8 with: $ pip install -U sympy There are a lot of changes since 1.7.1. The full release notes are here:

Re: [sympy] Re: How to change/influence the dependent/independent variables from solve

2021-04-09 Thread Oscar Benjamin
On Sat, 10 Apr 2021 at 01:17, brandon...@gmail.com wrote: > > This almost worked for me as is. My desired dependent variables are [w, y]. > If I just pass those, then I don't get the solution for z=1. So I did two > solves: > > 1. Solve with my desired dependent variables (e.g. [w, y]) > 2.

Re: [sympy] Re: How to change/influence the dependent/independent variables from solve

2021-04-09 Thread brandon...@gmail.com
> In your problem would it make more sense to have an API based around eliminating variables rather than solving for them? That might work. Eventually, the solution gets passed to some numerical code that needs to have values for all the symbols that obey the constraints in the system of

[sympy] How to change/influence the dependent/independent variables from solve

2021-04-09 Thread brandon...@gmail.com
Given the snippet below: from sympy import symbols, solve w, x, y, z = symbols("w x y z") equations = [ w + x + y - 1, z - 1, w/(w+y) - 0.5, w/(w+y) + y/(w+y) - 1 ] soln = solve(equations, (w, x, y, z), dict=True)[0] # accept first solution print(soln) the soln is: { w: y,

[sympy] Re: How to change/influence the dependent/independent variables from solve

2021-04-09 Thread Chris Smith
just list the variables for which you want to solve -- in this case, leave off the "x" and you will get ``` >>> soln [{w: 0.5 - 0.5*x, y: 0.5 - 0.5*x, z: 1.00}] ``` see also https://github.com/sympy/sympy/issues/2720 /c On Friday, April 9, 2021 at 1:32:51 PM UTC-5