Re: [sympy] Google Summer of Code

2023-02-28 Thread Davide Sandona'
r exist but it does not wrap the programming language of Asymptote). > > Here is the Asymptote wiki page - > > https://en.wikipedia.org/wiki/Asymptote_(vector_graphics_language) > On 2/28/23 7:21 AM, Davide Sandona' wrote: > > Hello Aaron, > > I'm Davide SandonĂ , the de

Re: [sympy] Google Summer of Code

2023-02-28 Thread Davide Sandona'
Hello Aaron, I'm Davide SandonĂ , the developer of the SymPy Plot Backend module ( https://github.com/Davide-sd/sympy-plot-backends). I've edited the plotting module section in the GSoC-ideas page, and added my name as a mentor. Quoting the page: > If you are willing to mentor, please add

Re: [sympy] Lambdify - performance using sympy as the module

2021-09-15 Thread Davide Sandona'
Thanks Oscar for the wonderful clarification! I rerun my code with SYMPY_USE_CACHE=no, now the results make much more sense. [image: lambdify-no-cache.png] Davide. Il giorno mer 15 set 2021 alle ore 15:14 Oscar Benjamin < oscar.j.benja...@gmail.com> ha scritto: > > On Wed, 15 Sept 2021 at

Re: [sympy] Lambdify - performance using sympy as the module

2021-09-15 Thread Davide Sandona'
> > What are the results you get from these? For me the last one is > slightly faster, which makes sense because the inputs don't have to be > converted to SymPy Floats first. > This chart summarizes my findings. Each dot represents the evaluation time with the specified module + data type. I

Re: [sympy] Cylindrical polar unit vectors

2021-08-13 Thread Davide Sandona'
By the way, what are the differences between sympy.vector and sympy.physics.vector ? Why two different modules? Davide. Il giorno ven 13 ago 2021 alle ore 15:06 Davide Sandona' < sandona.dav...@gmail.com> ha scritto: > Although the scalars are r, theta and z the unit vectors are i, j

Re: [sympy] Cylindrical polar unit vectors

2021-08-13 Thread Davide Sandona'
> > Although the scalars are r, theta and z the unit vectors are i, j and > k. How would I get vectors like e_r and e_theta to work with those? > As of now, that's not possible. It is hard-coded and it only represents cartesian unit vectors [1] As per the SO question, I don't think SymPy is

Re: [sympy] Basic plotting problem

2021-08-07 Thread Davide Sandona'
Hello Davide, In order to use Qt5 you need to install the following dependency: pip install PyQt5 After that it should work fine! Davide. Il giorno sab 7 ago 2021 alle ore 12:40 David Bailey ha scritto: > Dear All, > > Has anyone else encountered this problem - which seemed to start after

Re: [sympy] Problem with adding support at location with decimal values

2021-07-05 Thread Davide Sandona'
I suppose you are referring to R4.5000. This is a way to extract the forces/moments from the above equation: fs = list(b.load.free_symbols) R45, R0, M0 = fs[1:] M0, R0, R45 Now you can create a substitution dictionary and compute the load at a given location. Davide. Il giorno lun 5 lug

Re: [sympy] Equivalent mathematica implementation of Fourier transform relevant functions in sympy.

2021-05-22 Thread Davide Sandona'
Hello, I'm not really sure if those functions are implemented into SymPy yet. You should check out the documentation: search for example "discrete transform" or "Fourier transform". In Mathematica, symbolic and numeric computations go hand in hand. The Python ecosystem is very different in that

Re: [sympy] Re: Sympy unable to plot Fourier series, bug

2021-05-05 Thread Davide Sandona'
Use the doit() method, something like the following: f.doit() Davide. Il giorno mer 5 mag 2021 alle ore 14:58 Areeb Sherjil < areebsher...@gmail.com> ha scritto: > Oh no sorry, I used %matplotlib tk at the start and now it opens the graph > in separate window.(Google groups does not allow to

Re: [sympy] Re: Sympy unable to plot Fourier series, bug

2021-05-05 Thread Davide Sandona'
Whenever it makes sense, you should use assumptions on symbols. Since you are dealing with a Fourier Series, you should set: import sympy as syms import matplotlib.pyplot as plot import numpy as linspace n = syms.symbols('n', real=True, integer=True, positive=True) t = syms.symbols('t',

Re: [sympy] Plotting module

2021-05-04 Thread Davide Sandona'
> > Thank you for sharing. Do you think this is something you'd like to > see integrated into SymPy's plotting module eventually? > I think it would benefit a lot of users, but it's too soon to talk about integration because I'm still thinking about what needs to be added and what needs to be

Re: [sympy] SymPy subs().evalf() vs evalf(subs=dict(...))

2020-10-12 Thread Davide Sandona'
Hello Oscar, why is the float approximation of Rational('2.4') more precise of Float('2.4')? Davide. Il giorno lun 12 ott 2020 alle ore 14:14 Oscar Benjamin < oscar.j.benja...@gmail.com> ha scritto: > Hi, > > The evalf function is intended to compute the result to any given > specified

Re: [sympy] Trying to understand SymPy patterns

2020-09-19 Thread Davide Sandona'
Hello David, in Sympy there are three substitution methods: 1. subs: it is the most generic. 2. xreplace: it only replace the exact expression you provide. 3. replace: this is the most powerful, as it allows for "pattern matching operations". In your case, I would do something like this: f, g =

Re: [sympy] Re: Fourier Expansion

2020-08-25 Thread Davide Sandona'
Hello Mike, thank you very much, you really helped me! I was too focused exploring the different methods, and the solution was just under my nose. Thank you! :) Of course, the example I've chosen (the square wave) takes a tremendous amount of time to be solved by Sympy. Anyway, I tried a

[sympy] Fourier Expansion

2020-08-25 Thread Davide Sandona'
Hello everyone, Today I decided to refresh my knowledge of Fourier Expansion. I tried to use Sympy but I'm not sure if the result is correct or if I did something wrong, so I need a fresh pair of eyes on this :) I was following the "Fourier Series of a Square Wave" in the Wolfram documentation

Re: [sympy] Simplification of equations

2020-07-26 Thread Davide Sandona'
Hello Mike, sadly, what you are trying to do is not easily possible! You are thinking of Eq as an equation, instead in Sympy it is an alias for the class Equality. They are conceptually different and the behaviour you are trying to represent is not possible: you can not apply the same mathematical

Re: [sympy] lambdify list of arguments converted silently, why not throw a warning?

2020-07-09 Thread Davide Sandona'
You can wrap lambdify into a new function: def get_lambda(expr, modules="numpy", **kwargs): from sympy.utilities.iterables import ordered signature = list(ordered(expr.free_symbols)) return signature, lambdify(signature, expr, modules=modules, **kwargs) With it, the argument are

[sympy] AccumulationBounds vs Interval

2020-06-24 Thread Davide Sandona'
I'm exploring the source code and I have a conceptual problem: why `AccumulationBounds` does not inherit from `Interval`? After all, it is an interval with closed ends...I understand it is possible to do interval arithmetic with `AccumulationBounds`, however I've also seen the class `SetExpr`

Re: [sympy] Assumptions modules

2020-06-11 Thread Davide Sandona'
e > could use the new assumptions for simplification or refinement. That > gives us a clear path forward that can be implemented incrementally > > So to summarise the situation: > > 1. The new assumptions are basically not used anywhere in sympy. > 2. You should not expect them to

[sympy] Assumptions modules

2020-06-06 Thread Davide Sandona'
Until a couple of days ago, I always used the old assumption module defined in sympy.core.assumptions, where we create symbols with assumptions and then the expression infer the values for its assumptions. For example, I know that with this old module it's not possible to create a symbol x

[sympy] Vector Expression

2020-04-03 Thread Davide Sandona'
A few days ago I opened an issue requesting information about vector expressions [1]. Thanks to covid lock-down I had enough free-time to develop something. In the issue it was suggested that I could open a pull-request, but before doing that I would like to solve a problem I'm having a hard