Re: [sympy] Simplification of equations

2020-07-26 Thread gu...@uwosh.edu
Mike, I'm the author of the referenced pull request ( https://github.com/sympy/sympy/pull/19479) for the equation type. There is a version you can try without having to set up SymPy for development (see https://github.com/gutow/Algebra_with_Sympy, which I try to keep roughly equivalent to the d

Re: [sympy] Fwd: [NumFOCUS Projects] Call for Proposals - Small Development Grants - Summer 2018

2020-09-25 Thread gu...@uwosh.edu
Oops! I apologize. In the multiple layers of past calls, I missed that this current call was for projects to complete before the end of 2020. I withdraw my request as there is no way I can manage that. Jonathan On Friday, September 25, 2020 at 12:18:38 PM UTC-5 gu...@uwosh.edu wrote: > D

[sympy] Re: How to test the changes done in sympy

2021-01-03 Thread gu...@uwosh.edu
Praneeth, I agree this can be confusing. To get started testing your code you will need some things installed in your venv: 1. pytest 2. pytest-doctestplus 3. pyflakes You can see what is installed if you are in your venv shell (`pipenv shell` to enter if you are using pipenv), using the `pip li

Re: [sympy] Problem with sqrt(-1)

2021-01-04 Thread gu...@uwosh.edu
I believe a solution would be to plug into the preparser and override the behavior. All I know is that the preparser provides a way to do this. Jonathan On Monday, January 4, 2021 at 5:05:23 PM UTC-6 asme...@gmail.com wrote: > On Mon, Jan 4, 2021 at 3:32 PM David Bailey wrote: > > > > On 04/01

[sympy] Re: question about Rational

2021-01-06 Thread gu...@uwosh.edu
Thomas, These look like quantum energy level equations. Have you looked at sympy.physics.quantum to see if they have solved your problem? I seem to remember they have defined some special quantities for quantum numbers that are limited to integer and half-integer values. I make no promises as I

[sympy] We need some community input on the desired behavior of an equation class...

2021-01-06 Thread gu...@uwosh.edu
I have developed a SymPy tool that allows manipulation of equations (two expression equal to each other, e.g. `a*b = c/d`) using as close to standard mathematical notation as I could manage. This is primarily meant for interactive use when doing manual algebra, but has some potential uses as a

[sympy] Re: ModuleNotFoundError: No module named 'sympy'

2021-01-07 Thread gu...@uwosh.edu
Please provide more information if you want help with this. Where and how did you install sympy? Where and how did you try to import it? On Thursday, January 7, 2021 at 7:32:28 AM UTC-6 welers...@gmail.com wrote: > I have this problem, but i already installed the sympy module -- You received t

[sympy] Re: We need some community input on the desired behavior of an equation class...

2021-01-10 Thread gu...@uwosh.edu
On Saturday, January 9, 2021 at 5:57:09 AM UTC-6 syle...@gmail.com wrote: > But now I have an another question if the manipulation works in > algebraically robust way, > For example, we have lots of pitfalls of expression tree manipulation that > some simple examples like "x / x" work, > but we

Re: [sympy] Re: We need some community input on the desired behavior of an equation class...

2021-01-10 Thread gu...@uwosh.edu
David, Can you explain further what you are thinking in terms of dangerous functions? At present `Equations` supports doing things to only one side through syntax like `.applylhs(method, *args)` and less generally `.dorhs.method()`. So I think that `Equation` may already support what you are s

Re: [sympy] We need some community input on the desired behavior of an equation class...

2021-01-10 Thread gu...@uwosh.edu
, but people working on this have been thinking about the combination. Is there any behavior that you think it is important to add or change in the proposed `Eqn` class? Thanks for the feedback. Jonathan On Sunday, January 10, 2021 at 4:14:10 PM UTC-6 ga...@garthsnyder.com wrote: > > gu.

Re: [sympy] We need some community input on the desired behavior of an equation class...

2021-01-13 Thread gu...@uwosh.edu
Because there have been some requests off-list, I have converted the demonstration code into a PyPi module. You can install with `pip install -U Algebra-with-SymPy` or `pip install -U Algebra_with_SymPy`. The import statement is now `from algebra_with_sympy import *`. The BinderHub demonstratio

Re: [sympy] We need some community input on the desired behavior of an equation class...

2021-01-19 Thread gu...@uwosh.edu
Aaron, Thank you for the comments. I need go through them more carefully, but I did want to direct you to the SymPy pull request for the `Eqn` class that implements everything in the Binder except for the ability to use `solve` on an `Eqn`. My preferen

Re: [sympy] We need some community input on the desired behavior of an equation class...

2021-01-20 Thread gu...@uwosh.edu
just pass the lhs to integrate if that's all this is doing: > > >>> integrate(eq.lhs, T) > P*T*V > > I think that for integration and differentiation we should stick to > the general approach implied by apply or do e.g. we use apply to > integrate both sides a

Re: [sympy] We need some community input on the desired behavior of an equation class...

2021-02-04 Thread gu...@uwosh.edu
ill give the impression that > sympy > > > >> is buggy (other things like this already have that effect). > > > >> > > > >> I would much rather stick to an API that can work in general without > > > >> risk of bugs and I would prefer users to

Re: [sympy] We need some community input on the desired behavior of an equation class...

2021-02-05 Thread gu...@uwosh.edu
-6 gu...@uwosh.edu wrote: > I think the issue is whether we are thinking about this as computer code > or a computer tool for doing mathematics. > > I believe the mathematical concept of an equation that connects two > expressions with an equals sign also implies an assignment.

Re: [sympy] We need some community input on the desired behavior of an equation class...

2021-02-06 Thread gu...@uwosh.edu
t the list know what the responses are. I'll probably wait a few more days to make sure people have a chance to respond. Jonathan On Saturday, February 6, 2021 at 11:16:23 AM UTC-6 da...@dbailey.co.uk wrote: > On 06/02/2021 03:07, gu...@uwosh.edu wrote: > > As the number of d

[sympy] Re: Simplify, how return code instead of TeX?

2021-02-10 Thread gu...@uwosh.edu
wrap your expression in a `print()` statement: `print(1+x+x**2+x**3)`. On Wednesday, February 10, 2021 at 9:43:44 AM UTC-6 michal.bozyd...@gmail.com wrote: > Hi. > > I'd like to generate code of simplified formula. I.E: > > When I pass: 1+x+x**2+x**3 > I'd like to have: x**3+x**2+x+1 > > Is it po

[sympy] Re: Simplify, how return code instead of TeX?

2021-02-10 Thread gu...@uwosh.edu
have : > > x**3-x**2+x-1 > > Is it possible? > > Thanks Mike > > środa, 10 lutego 2021 o 19:59:55 UTC+1 gu...@uwosh.edu napisał(a): > >> wrap your expression in a `print()` statement: `print(1+x+x**2+x**3)`. >> On Wednesday, February 10, 2021 at 9:43:44 AM UTC-6

Re: [sympy] [SymPy] Is this a bug or a feature?

2021-02-10 Thread gu...@uwosh.edu
I'm swamped with grading and class preparation, but wanted to comment briefly on the items below: On Wednesday, February 10, 2021 at 3:58:21 PM UTC-6 asme...@gmail.com wrote: > On Wed, Feb 10, 2021 at 1:44 PM Oscar Benjamin > wrote: > > Yes, DivideSides would make sense for unevaluated divisio

[sympy] Re: How to randomly sample from custom probability distributions

2021-02-18 Thread gu...@uwosh.edu
I think you have capital and little 'z' when you want only one. See the last three lines. On Thursday, February 18, 2021 at 4:26:15 AM UTC-6 bhu...@gmail.com wrote: > I've looked in the SymPy documentation and cannot find a template for > this. I apologise if I've overlooked something and the a

[sympy] Re: How to test my code

2021-03-12 Thread gu...@uwosh.edu
This sounds as if it may be an issue with switching GIT branches. Are you modifying the file in a GIT branch or making a whole new file? Things should work if you modify the original file on a branch and run the tests on the branch. On Friday, March 12, 2021 at 3:12:20 AM UTC-6 deeps...@gmail.

[sympy] Re: SymPy Resource

2021-03-25 Thread gu...@uwosh.edu
This will not be practical unless you can change your advertisement settings, so that the interruptions do not make it difficult to follow your presentation. I gave up after about 2 minutes because of the interruptions. What I saw might be useful to people who do not like to read instructions.

[sympy] Re: Plotting module

2021-05-03 Thread gu...@uwosh.edu
Davide, Thank you for working on this. I am particularly interested in K3D as I have been using it for data and am very impressed. I will look at this, but not for at least two weeks. We are approaching exams... Jonathan On Monday, May 3, 2021 at 4:18:09 PM UTC-5 sandona...@gmail.com wrote: >

Re: [sympy] Introducing Equation module

2021-05-09 Thread gu...@uwosh.edu
David, A pip install that does this and more is available through Algebra_with_SymPy . The Algebra with SymPy repository also has a Binder link were you can try this out. I have been using it for about

Re: [sympy] Introducing Equation module

2021-05-09 Thread gu...@uwosh.edu
' to maintain consistency with the most standard mathematical notation used. Jonathan On Sunday, May 9, 2021 at 5:36:28 PM UTC-5 da...@dbailey.co.uk wrote: > On 09/05/2021 22:59, gu...@uwosh.edu wrote: > > David, > > A pip install that does this and more is available thro

Re: [sympy] Introducing Equation module

2021-05-11 Thread gu...@uwosh.edu
> I called myself naive, in that I suppose I think it would ideally know > that SymPy would not generate ambiguous results. One simple answer here > might be not to supply a simple rendering of Equation(a,b) except to for > use with TeX, where I suppose it would be possible to render the '=' in

Re: [sympy] Introducing Equation module

2021-05-13 Thread gu...@uwosh.edu
Jisoo, If you can get it to work that would be great. I tried to squash everything into one commit in PR #21333, but I could not get GIT to do it. I'm not sure why. If you do get it to work, please let me know how. Jonathan On Wednesday, May 12, 202

Re: [sympy] Introducing Equation module

2021-05-13 Thread gu...@uwosh.edu
Having tried various versions of what Matthias suggests, I think the solution for my case is probably what Chris suggests. Thanks, Jonathan On Thursday, May 13, 2021 at 10:47:23 AM UTC-5 matthia...@gmail.com wrote: > Hi Jonathan. > > On Thu, May 13, 2021 at 3:02 PM gu...@uwosh.

Re: [sympy] Python integer divisions should be fractions

2021-05-14 Thread gu...@uwosh.edu
I want to second Aaron's comment. Please just use `sympy.init_session(auto_int_to_Integer=True)` if you want that behavior. As a scientist who uses python to process large data sets I do not want it to bog down trying to do exact calculations. Most datasets only have a few significant figures

Re: [sympy] Python integer divisions should be fractions

2021-05-16 Thread gu...@uwosh.edu
I agree with Aaron that trying to keep exact expressions makes the most sense in an interactive environment (IPython, Jupyter, etc.). Sagemath uses a preparser before passing the code to Python. I'm not sure if Sympy coul

Re: [sympy] Introducing Equation module

2021-05-19 Thread gu...@uwosh.edu
On Friday, May 14, 2021 at 8:05:27 AM UTC-5 smi...@gmail.com wrote: > the str() representation should be something that can be copy-pasted I like the ability to cut-and-paste the output of a `print()`. However, delving into the standards for Python suggests that `repr()` should return an expr

Re: [sympy] Introducing Equation module

2021-05-20 Thread gu...@uwosh.edu
On Thursday, May 20, 2021 at 5:45:39 AM UTC-5 hanspete...@fhnw.ch wrote: > In SymPy, str() is meant to be copy-paste-d. See > https://docs.sympy.org/latest/tutorial/printing.html#st > > Let me restate my question. I am clear on what the

[sympy] Re: Idiomatic use of derivative replacements

2021-10-05 Thread gu...@uwosh.edu
Marcel, I believe you are correct that sympy has a problem with this. I ran into issues when trying to define the behavior of integration and differentiation for the equation class I have defined. Unfortunately, I am completely swamped with committee and large class administration duties right

[sympy] Re: Plotting

2021-11-10 Thread gu...@uwosh.edu
I think that having a way of getting publication quality output would be great. However, I think for what most people do the good interactive graphics of the plotly (2D, mostly, see https://plotly.com/python/) and K3d (3D, see https://github.com/K3D-tools/K3D-jupyter) are better. If enough peop

Re: [sympy] Re: Plotting

2021-11-11 Thread gu...@uwosh.edu
report > quality graphics. > On 11/10/21 7:05 PM, gu...@uwosh.edu wrote: > > I think that having a way of getting publication quality output would be > great. However, I think for what most people do the good interactive > graphics of the plotly (2D, mostly, see https://plotly

[sympy] Re: Using sympy.physics.units

2022-02-04 Thread gu...@uwosh.edu
David, I too have found that the units package has been problematic for me to use. My solution is the following. Units behave as positive numbers (real numbers) the way we use them in the physical sciences. Thus I just define symbols for any units I want to use as positive variables, for examp

[sympy] Re: Using sympy.physics.units

2022-02-04 Thread gu...@uwosh.edu
, February 4, 2022 at 12:57:01 PM UTC-6 gu...@uwosh.edu wrote: > David, > > I too have found that the units package has been problematic for me to > use. My solution is the following. > > Units behave as positive numbers (real numbers) the way we use them in the > physical

[sympy] Re: scientific notation in pretty print and latex

2022-02-07 Thread gu...@uwosh.edu
I'm not sure of your exact use case, but maybe what I do when rounding numbers to match their errors will give you some ideas. https://github.com/gutow/round_using_error. In this case I end up determining the power of ten for the scientific notation using log base 10. Jonathan On Monday, Febru

Re: [sympy] Re: scientific notation in pretty print and latex

2022-02-08 Thread gu...@uwosh.edu
achieve the last behaviour to improve readability > in the terminal with pretty print? > > Also using this hack messes up pretty print if used with sympy.vector > objects, which is perhaps a bug. > > Best wishes, > Rajeev > > > > On Mon, 7 Feb 2022 at 19:0

Re: [sympy] scientific notation in pretty print and latex

2022-02-09 Thread gu...@uwosh.edu
Rajeev, If I understand correctly, you are worried about the way functions, factors and symbols are ordered in an evaluated expression. Your example is the expected behavior. When an expression is evaluated, sympy has to decide how to order the symbols. The default ordering is alphabetical. With

Re: [sympy] scientific notation in pretty print and latex

2022-02-09 Thread gu...@uwosh.edu
> visible. > > Best wishes, > Rajeev > > > On Wed, 9 Feb 2022, 7:30 p.m. gu...@uwosh.edu, wrote: > >> Rajeev, >> If I understand correctly, you are worried about the way functions, >> factors and symbols are ordered in an evaluated expression. Y

[sympy] Re: Help with simplification of algebraic fractions

2022-02-19 Thread gu...@uwosh.edu
1) Because of the way expressions are parsed in sympy before displaying I am not aware of a way of doing this. You can experiment with sympy.ratsimp(), but my tests show that you will get the same expanded expression output in the end. 2) You probably do not want to use sympy.Eq to represent an

[sympy] Re: Help with simplification of algebraic fractions

2022-02-19 Thread gu...@uwosh.edu
Actually, I found what you are looking for. The operation sympy.factor() will combine them over one denominator. This will work for a sympy.Eq() as long as it does not evaluate to True or False. Regards, Jonathan On Saturday, February 19, 2022 at 5:19:54 PM UTC-6 daskal...@gmail.com wrote: > H

Re: [sympy] SymPy 1.10rc2 released

2022-02-23 Thread gu...@uwosh.edu
I can verify that 1.10rc2 passes all tests with my algebra_with_sympy package. This is despite the sketchy things I do with execute to re-define how functions are called after importing sympy into the user namespace for interactive use. This suggests no major core change issues. Jonathan On W

Re: [sympy] more unified (and usable) solve output

2022-03-04 Thread gu...@uwosh.edu
I think the name should be something like "solve2" and provide a couple year deprecation warning after which "solve" points to "solve2". Jonathan On Friday, March 4, 2022 at 1:40:58 AM UTC-6 moore...@gmail.com wrote: > I think changing this will break tons of code in the wild. Isnt it best > m

[sympy] Release 0.9.1 of Algebra-with-Sympy package...

2022-03-24 Thread gu...@uwosh.edu
I would like to make everyone aware of an update to the Algebra-with-Sympy package. This is a working implementation of algebraic manipulation of equations with the relational operator "=". This implements a superset of the functionality proposed in

Re: [sympy] Release 0.9.1 of Algebra-with-Sympy package...

2022-03-25 Thread gu...@uwosh.edu
530-601-9791 <(530)%20601-9791> > > > On Fri, Mar 25, 2022 at 1:42 AM gu...@uwosh.edu wrote: > >> I would like to make everyone aware of an update to the >> Algebra-with-Sympy <https://gutow.github.io/Algebra_with_Sympy/> >> package. This is a work

[sympy] Re: Keeping expressions short and concise

2022-04-19 Thread gu...@uwosh.edu
Is this the behavior you are trying to get? >>> from algebra_with_sympy import * >>> algwsym_config.output.human_text=True >>> var('psi k x') (psi, k, x) >>> eq1=Eqn(psi, exp(I*k*x)) >>> eq1 psi = exp(I*k*x) >>> eq2 =diff(eq1,x) >>> eq2 Derivative(psi, x) = I*k*exp(I*k*x) >>> eq2.subs({exp(I*k*x)

[sympy] Re: Keeping expressions short and concise

2022-04-19 Thread gu...@uwosh.edu
Alternative path that works better with complicated derivatives. Also shows the nicer output inside Jupyter notebooks. [image: Screen Shot 2022-04-19 at 9.23.21 AM.png] On Tuesday, April 19, 2022 at 8:16:25 AM UTC-5 gu...@uwosh.edu wrote: > Is this the behavior you are trying to

[sympy] Re: Keeping expressions short and concise

2022-04-19 Thread gu...@uwosh.edu
> pip install -U Algebra-with-SymPy >... lots of stuff, followed finally by >ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\Users\\python\\AppData\\Local\\Temp\\pip-uninstall-pns2p03y\\jupyter-kernel.exe' >Consider using the `--user` option or check the p

[sympy] Re: Sympy to Numerical

2022-05-24 Thread gu...@uwosh.edu
There are a lot of different options. I suggest you start by looking at these: * Using the built in sympy plotting (https://docs.sympy.org/latest/modules/plotting.html) * Using the quite nice sympy plotting backend extension ( https://sympy-plot-backends.readthedocs.io/en/latest/overview.html) *

[sympy] Re: SymPy Integration Query

2022-06-08 Thread gu...@uwosh.edu
I am not sure you are doing anything wrong. I tried it and it appears that you are running up against an inefficiency in the integrator. More investigation would be necessary to figure out why it is taking so long. I can reproduce a very long run time (>5 minutes, at which point I stopped the p

Re: [sympy] RFC on solve being used to solve for undetermined coefficients

2022-07-01 Thread gu...@uwosh.edu
+1 for separating out undetermined coefficients. I am sure this will break somebody's code. However, I agree that the behavior of solve is so inconsistent that I do not think there is a reasonable way of deprecating this. I generally only use solve in an interactive environment and as little as

Re: [sympy] get sqrt to work

2022-08-18 Thread gu...@uwosh.edu
Based on my experience developing fitting tools to be used by undergraduates (see https://jupyterphysscilab.github.io/jupyter_Pandas_GUI/) I think your choice of lmfit and scipy.optimize are good options. Jonathan On Thursday, August 18, 2022 at 7:35:00 AM UTC-5 z.kari...@gmail.com wrote: > V

Re: [sympy] get sqrt to work

2022-08-18 Thread gu...@uwosh.edu
gate.net/profile/Zohreh-Karimzadeh> > Skype Name 49a52224a8b6b38b > Twitter Account @zohrehkarimzad1 > z.kari...@gmail.com > +989102116325 <+98%20910%20211%206325> > > Value Water))))))) > >

Re: [sympy] get sqrt to work

2022-08-24 Thread gu...@uwosh.edu
Zohreh, I pulled the paper. I see no reason you need to use SymPy to do the numerical fitting. I would approach this by inputting the species in a dictionary or list and then use that to call functions that generate the computed value for each term/sum. Are you trying to keep track of the com

Re: [sympy] get sqrt to work

2022-08-24 Thread gu...@uwosh.edu
or > each chemical systems. > > > Zohreh Karimzadeh > > Contact me on >+989102116325 <+98%20910%20211%206325> > and at > z.kari...@gmail.com > 🌧️🌍🌱 > > On Wed, 24 Aug 2022, 19:3

Re: [sympy] get sqrt to work

2022-08-26 Thread gu...@uwosh.edu
>> As can be seen in the former script, parameter names should be made in > a dynamic way. > >> I am wondering how using for loop in string can be simultaneously > handled. > >> Regards, > >> Zohreh Karimzadeh > >> https://www.researchgate.net/profile/

Re: [sympy] get sqrt to work

2022-08-31 Thread gu...@uwosh.edu
c_dic[k1] ** 2)) > sqrt_I += sp.sqrt(Ionic) > print(Ionic, sqrt_I) > return Ionic, sqrt_I > AS can be seen while all of these kinds of functions must be evaluated > or substituted in the main model. > Is it still possible to use strings instead of sympy?? > Regards, > Zohre

Re: [sympy] get sqrt to work

2022-09-01 Thread gu...@uwosh.edu
> > Is there any way to pass computed ionicstr()[0] to string?? > Zohreh Karimzadeh > Skype Name 49a52224a8b6b38b > Twitter Account @zohrehkarimzad1 > +989102116325 <+98%20910%20211%206325> > > Value Water))) > > > On

[sympy] Algebra_with_Sympy v0.10.0 release...

2022-09-05 Thread gu...@uwosh.edu
Available on pypi: pip install Algebra-with-SymPy==0.10.0. See: https://gutow.github.io/Algebra_with_Sympy/algebra_with_sympy.html. - Documentation updates and fixes. - Significantly increased test coverage (~98%). - Support for Eqn.rewrite(Add). *Thank you Davide Sandonà!* - Solvin

Re: [sympy] Simple methods for row operations

2022-11-04 Thread gu...@uwosh.edu
If there is a need to extend sympy operations in a jupyter friendly manner, it might also be possible to add the operations you want to the Algebra-with-Sympy package. The hope is the user interface utilities will eventually be incorporated into sym

Re: [sympy] Dimensional Analysis

2022-11-17 Thread gu...@uwosh.edu
An alternative interpretation of your question is that you are asking if sympy is aware of the rules for propagating significant digits through calculations? The answer is no. You have to apply the rules yourself to decide appropriate rounding. Additional alternatives: 1) set up interval arit

[sympy] Re: Convert sympy results to svg string

2022-11-17 Thread gu...@uwosh.edu
Are you trying to convert typeset math into a scalable vector graphic image (.svg) or do you mean something else? On Thursday, November 17, 2022 at 7:54:48 AM UTC-6 antonv...@gmail.com wrote: > I'm taking about result of calculations, for instance: > expr = sympify("1+2/3*sin(x)") > result = st

Re: [sympy] Displaying quantities in SI base units

2022-11-28 Thread gu...@uwosh.edu
Teo, My solution is to treat units as positive valued symbols and skip the units tool in sympy. Then you just define things in the set of units you wish to use and force your students to think about converting among them. For some examples see the documentation for Algebra_with_Sympy

[sympy] Re: ChatGPT and SymPy

2022-12-14 Thread gu...@uwosh.edu
Just for some additional perspective. I have also tried this on some general chemistry word problems. In general, I see it getting basic one logical step processes correct (e.g. a single step dilution or grams -> moles). Things with multiple steps or requiring understanding the physical situati

[sympy] Re: Step-by-Step mathematics in SymPy

2022-12-28 Thread gu...@uwosh.edu
S.Y., The only part of what you are proposing that I believe I understand is that you suggest sympy should avoid automatic evaluation/simplification/collapse of expressions. The specific example I can think of where this would often be useful is with differentiation (the default behavior of Der

[sympy] Re: Step-by-Step mathematics in SymPy

2023-01-01 Thread gu...@uwosh.edu
t;>> rather than making it more deeply connected with the physics. >>> >>> Similar as how you'd usually perceive that numeric analysis need >>> hypothesis about approximating the physical world problem by numeric errors, >>> I also believe that any symbo

[sympy] Re: Step-by-Step mathematics in SymPy

2023-01-02 Thread gu...@uwosh.edu
On Monday, January 2, 2023 at 6:33:38 AM UTC-6 syle...@gmail.com wrote: > I think that simplify or evaluation should rather be decomposed in many > components > To a great extent I think sympy already does this through the specialized simplification options such as `radsimp()`. However, I do th

[sympy] Re: Convert string of a named expression in sympy to the expression itself

2023-01-09 Thread gu...@uwosh.edu
I am not clear why you are working with strings and not just the expressions? I think the following may be what you want: ``` >>> import sympy as sp >>> a,b = sp.symbols('a b', positive = True) >>> expr = 1.01*a**1.01*b**0.99 >>> expr 1.01*a**1.01*b**0.99 >>> expr1 = 2*expr >>> expr1 2.02*a**1.01*

[sympy] Re: Convert string of a named expression in sympy to the expression itself

2023-01-09 Thread gu...@uwosh.edu
lems, but I have not encountered any place where repr(expression) does not work. On Monday, January 9, 2023 at 2:45:26 PM UTC-6 Santiago S wrote: > Because I want to build the name of the expressions to check by > concatenating other strings, and then evaluate. > All this within loops, et

[sympy] Announcing Algebra_with_Sympy v0.11.0...

2023-06-15 Thread gu...@uwosh.edu
This pip installable module is an interactive extension for using Sympy allowing it to recognize and use equations (e.g. f = a*x^2 + ln(c)). It was initially designed to assist students and instructors using Sympy for algebraic manipulation of equations. I personally use it extensively to produ

Re: [sympy] Easy way to use S()

2023-07-03 Thread gu...@uwosh.edu
David, I want to make sure I understand the behavior you would prefer, because I think I can implement it in algebra-with-sympy . The package already does some pre-parsing, so I think I could handle it there. Here is what I th

Re: [sympy] Easy way to use S()

2023-07-03 Thread gu...@uwosh.edu
py has a -i flag to interpret integer literals as sympy Integers (and therefore integer division as rational division): >$ isympy -i On Monday, July 3, 2023 at 8:44:07 AM UTC-5 gu...@uwosh.edu wrote: > David, > > I want to make sure I understand the behavior you would prefer, beca

Re: [sympy] Easy way to use S()

2023-07-03 Thread gu...@uwosh.edu
3e4 in sympy pretty printing is output as a decimal number. At somewhere greater that 10^10 pretty printing switches to scientific notation with a • in sympy. In the code cells I insist on using * for multiplication to avoid any questions about implicit multiplication and multi-character variab

Re: [sympy] Easy way to use S()

2023-07-07 Thread gu...@uwosh.edu
David, I will work to get this into Algebra_with_Sympy quickly. I will post when I complete the next release. Since these ease of use issues are not cleanly addressable within SymPy proper, maybe you can think of Algebra_with_SymPy as your interactive front-end for sympy. Jonathan On Friday,

Re: [sympy] Easy way to use S()

2023-07-08 Thread gu...@uwosh.edu
tps://gutow.github.io/Algebra_with_Sympy/algebra_with_sympy.html#controlling-the-format-of-interactive-outputs> Jonathan On Saturday, July 8, 2023 at 5:39:46 AM UTC-4 da...@dbailey.co.uk wrote: > On 07/07/2023 23:23, gu...@uwosh.edu wrote: > > David, > > > > I will work to get this into

Re: [sympy] Easy way to use S()

2023-07-12 Thread gu...@uwosh.edu
Algebra_with_Sympy release v0.12.0 <https://pypi.org/project/Algebra-with-SymPy/> is now available. It now interprets numbers without decimals as sympy integers. This feature can be turned on and off. On Saturday, July 8, 2023 at 11:39:45 PM UTC-5 gu...@uwosh.edu wrote: > David, &

Re: [sympy] Blog post about the the future of SymPy

2023-09-01 Thread gu...@uwosh.edu
Take a look at SageMath (https://www.sagemath.org/), which does pulls together lots of disparate packages. I have used it and even contributed to it. I recommend it for people doing pure math or sophisticated niche work. However, It has historically been too heavy-we

[sympy] Re: Expressing exponents as fractions (not decimals)

2023-10-27 Thread gu...@uwosh.edu
Within an IPython session this can be achieved with `sympy.interactive .session.enable_automatic_int_sympification(*shell*)`. See the documentation: https://docs.sympy.org/latest/modules/interactive.html#module-sympy.interactive. An alternative is to use Algebra_with_Sympy

[sympy] Re: Go a step back after a bad manipulation

2023-12-04 Thread gu...@uwosh.edu
If you are having sympy do the math for you using `solve`, `factor`, `simplify` and things like that it is often difficult. One option is to restart your notebook kernel and run all the steps except for the one you made a mistake at. If you are doing algebraic steps by hand, you can just revers

Re: [sympy] Go a step back after a bad manipulation

2023-12-06 Thread gu...@uwosh.edu
Aaron's comments are really important. These are pitfalls that can easily lead to inconsistent outcomes and notebooks that do not work. On Wednesday, December 6, 2023 at 3:09:16 PM UTC-6 asme...@gmail.com wrote: > It really depends on how you structure your code. SymPy expressions > are immutabl

[sympy] Announcing Algebra_with_SymPy release V1.0.0...

2024-01-02 Thread gu...@uwosh.edu
I am pleased to announce the first non-beta version of Algebra_with_SymPy . This extension to SymPy is designed to make it convenient to do symbolic math in a step-by-step manner that resembles what you would do on paper as closely as possible. Some

Re: [sympy] Announcing Algebra_with_SymPy release V1.0.2...

2024-07-05 Thread &#x27;gu...@uwosh.edu' via sympy
6 illu...@gmail.com wrote: > Just want to give you a quick heads up - this looks awesome! > > Will set some time aside to test it out. > > On Tue, Jan 2, 2024 at 6:54 PM gu...@uwosh.edu wrote: > >> I am pleased to announce the first non-beta version of Algebra_with_SymP

[sympy] Announcing Algebra_with_Sympy release 1.1.0, including more sophisticated assignment of integers as exact...

2024-07-22 Thread &#x27;gu...@uwosh.edu' via sympy
hope). On Friday, July 5, 2024 at 11:27:54 AM UTC-5 gu...@uwosh.edu wrote: > Announcing bugfix release v.1.0.2 for Algebra with Sympy > <https://gutow.github.io/Algebra_with_Sympy/algebra_with_sympy.html>. > This one solves some display issue problems specific to Google Colab

[sympy] Re: allowing Eq as recognized subs argument?

2024-03-28 Thread &#x27;gu...@uwosh.edu' via sympy
It seems to me that we are about to start again the discussion that lead me to propose and implement the `Equation` class. This class has not been folded into Sympy, but exists in the fork I am presently maintaining https://github.com/gutow/sympy-for-algebra/, which I ended up creating to suppo

Re: [sympy] Re: allowing Eq as recognized subs argument?

2024-03-29 Thread &#x27;gu...@uwosh.edu' via sympy
On Thursday, March 28, 2024 at 5:47:11 PM UTC-5 asme...@gmail.com wrote: I think we should try to include something like this in SymPy. I'm a little confused by your screenshot. eq =@ c = d is not valid Python syntax. Are you extending the parser somehow to make it valid? Aaron Meurer Aaro

[sympy] Re: New member

2024-05-29 Thread &#x27;gu...@uwosh.edu' via sympy
Debapriya, Welcome. I suggest you start with the links below. Go to https://github.com/sympy/sympy/wiki/introduction-to-contributing and read about contributing to the project. Then look at the Easy to Fix and Good First Issues in the Github repository: https://github.com/sympy/sympy/issues?q

Re: [sympy] Re: allowing Eq as recognized subs argument?

2025-07-22 Thread &#x27;gu...@uwosh.edu' via sympy
](https://github.com/sympy/sympy/pull/28258). If you do not have a github account, creating one is easy and it does not mean you have to write code. The community needs input from users as well as the people who write the code. Thanks, Jonathan On Friday, March 29, 2024 at 9:21:47 AM UTC-5 gu