Re: [sympy] Newbie

2019-07-13 Thread Tanvi Singhal
Hey Lee I will check it out. Thanks


On Sat, 13 Jul 2019 at 15:36, Oscar Benjamin 
wrote:

> Hi Tanvi,
>
> It's great that you want to contribute!
>
> Take a look here (I guess you already did):
> https://github.com/sympy/sympy/wiki/introduction-to-contributing
>
> Every part of SymPy can be improved in some way. You mention matrices
> - there is a lot of work going on for matrices and many issues:
>
> https://github.com/sympy/sympy/issues?utf8=%E2%9C%93=is%3Aopen+is%3Aissue+label%3Amatrices
>
> https://github.com/sympy/sympy/issues?utf8=%E2%9C%93=is%3Aopen+is%3Aissue+label%3Amatrices.expressions
>
> Also for calculus, are you familiar with differential equations? There
> are lots of issues for those:
>
> https://github.com/sympy/sympy/issues?utf8=%E2%9C%93=is%3Aopen+is%3Aissue+label%3Asolvers.dsolve
>
> I would suggest to familiarise yourself with the parts of SymPy you
> might want to work on and then find the easiest possible issue to work
> on. You can ask on the issue to check if anyone else is working on it
> and to confirm that it is easy. Some are marked "easy to fix" or "good
> first issue" but sometimes those labels can be misleading...
>
> https://github.com/sympy/sympy/issues?utf8=%E2%9C%93=is%3Aopen+is%3Aissue+label%3A%22Easy+to+Fix%22+
>
> https://github.com/sympy/sympy/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22
>
> --
> Oscar
>
> On Fri, 12 Jul 2019 at 10:06, Tanvi Singhal 
> wrote:
> >
> > I am Tanvi Singhal, a 4th year undergraduate from IIT Roorkee, India. I
> am pursuing an Int. Mtech degree in Geology. I know basics of Python and I
> have read Sympy Tutorial. I am familiar with calculus, trigonometry,
> Matrices and I want to contribute. I found sympy perfect for Maths lovers.
> I would be glad if you can guide me on how to proceed.
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "sympy" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to sympy+unsubscr...@googlegroups.com.
> > To post to this group, send email to sympy@googlegroups.com.
> > Visit this group at https://groups.google.com/group/sympy.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/52b74ef0-3156-4c57-9ac6-fd51f3e85ea1%40googlegroups.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/CAHVvXxQ_ojzt5mp1nkmkUnL6W%3DgCJdopWRy2oE_tnyqjg%3DMVcA%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAOgZ%3DFkupQZWCysyj5xn6%2Bnbu4iqNu975FYrXxnO1Q4-fqgQ_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] simplifying large boolean expressions/equations

2019-07-13 Thread Aaron Meurer
The size of DNF is exponential in the number of variables, so it’s not
surprising it is slower for expressions with many variables. CNF is the
more standard form that scales well with the size of the expression.

Aaron Meurer

On Sat, Jul 13, 2019 at 2:55 PM Oscar Benjamin 
wrote:

> Can you show a (short) example of some code that you've tried?
>
> ‪On Sun, 7 Jul 2019 at 17:18, ‫רועי גרמיזו‬‎ 
> wrote:‬
> >
> >  Hi, what is the best way to simplify a boolean equation with more than
> 8 variables? setting force to true on simplify_logic just takes too long,
> and to_dnf sometimes takes too long or don't really change the expression.
> I don't necessarily have to use sympy, but I belive it is the best (or
> least worst) option for me right now
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "sympy" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to sympy+unsubscr...@googlegroups.com.
> > To post to this group, send email to sympy@googlegroups.com.
> > Visit this group at https://groups.google.com/group/sympy.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/1f2681fc-4973-4375-8839-819ac58e9112%40googlegroups.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/CAHVvXxQvm%3DPuDo_X3ZWGfbcGLokBNvNyy29bWfFRZ6QDt1B0%3DQ%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6Je2x5ehe-1SwWhX1YeJKHg3AcEqy2rG_AR3_XasZDjyQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Re: Interested in working on SymPy's quantum physics module

2019-07-13 Thread Oscar Benjamin
Hi Tilman,

It's a shame the project didn't work out but I'm glad to hear you're
still interested in contributing. Let us know if you start working on
this and want any guidance/help.

--
Oscar

On Sat, 6 Jul 2019 at 18:20, Tilman Roeder  wrote:
>
> Hey everyone,
>
> After talking to the people at my university, it seems like it is unlikely 
> that I will be able to get involved as part of the university project. But 
> once I have some time, I will look through the open issues and see if there 
> is anything I can do :)
>
> Apologies for making you guys wait around so long, the process of talking to 
> people has been much more long-winded than I anticipated.
>
> Tilman
>
> On Sunday, May 19, 2019 at 2:29:01 AM UTC+1, Tilman Roeder wrote:
>>
>> Hello,
>>
>> My name is Tilman. Me (and a friend of mine) are interested in working on 
>> extending and polishing the quantum physics module in SymPy as part of a 
>> university project. We both study Physics (currently in our 2nd year) at 
>> Imperial College London. The project work would be during the next academic 
>> year (so from September). However, I think it would be valuable to get 
>> started with some simple things to get aquatinted with the code base and 
>> process (as well as allowing plenty time to read up on the relevant 
>> subjects).
>>
>> From looking through the documentation etc. I get the impression that the QM 
>> module is currently very much a work in progress (especially the quantum 
>> information/ computation bits). From what I can tell, a good thing to get 
>> started on might be adding a few analytic solutions. There is one for the 
>> infinite square well, but none e.g. the harmonic oscillator. Starting with 
>> something very simple like this could be a really good way of getting to 
>> know the process, while focussing on the code etc., before tackling 
>> something more challenging.
>>
>> My friend and I are meeting someone in the physics department next week to 
>> discuss if this kind of work would be suitable for our project, and it would 
>> be really helpful to get the opinion of someone more closely involved with 
>> SymPy on this matter. (Note that I am also interested in contributing, 
>> should this turn out to not be suitable as part of my university work.)
>>
>> We are currently writing exams, but in about a month I would love to get 
>> started on some simple things to get a head start on the main project work.
>>
>>
>> TL;DR (useful pieces of information):
>>
>> - Interested to work on QM module
>> - Good experience with Python, especially for scientific computing, as well 
>> as some experience using SymPy to do hard integrals. See specifically these 
>> two repos on my GitHub: https://github.com/dyedgreen/schroedinger, 
>> https://github.com/dyedgreen/labs-ray-tracing
>> - Experience with other languages like C, Golang, Ruby, JavaScript
>> - Mathematics education level: 2nd year Theoretical Physics Undergraduate
>> - I speak English and German
>>
>> Thanks for taking the time to read this :)
>>
>>
>> Tilman
>>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/1f25e83d-ed3f-4871-b0d3-d85fec617939%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAHVvXxSKcb6cxV8ZbU-K4b5uwOUozgkwgjgKvYgP692cXmp3JQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Newbie: display product

2019-07-13 Thread Oscar Benjamin
On Sat, 13 Jul 2019 at 21:40, Gary Pajer  wrote:
>
> Oscar,
>
> That does seem to do what I want ... I think.
> What's the difference between this and Chris Smith's answer?

I think that both Chris and Gagandeep thought that you were trying to
do something more complicated than you actually were.

> I think I made a symbolic equation between symbols.  Didn't you make a 
> *pythonic*  assignment?   Then python did the right thing when using the 
> multiplication operation '*' (by overloading?)

So what happens if I break it down is this:

In [1]: x, y = symbols('x, y')

In [2]: x
Out[2]: x

In [3]: y
Out[3]: y

In [4]: a = x + y

In [5]: a
Out[5]: x + y

In [6]: b = x * y

In [7]: b
Out[7]: x⋅y

In [8]: a*b
Out[8]: x⋅y⋅(x + y)

Note that I haven't created any symbols called a and b because I don't
need to. They are Python variables. The line a = x + y creates an
expression object and assigns it to a (as a normal Python assignment).
Likewise for the line b = x * y. SymPy doesn't know that I have called
these objects a and b and it doesn't need to.

Since a (as a Python variable) refers to the expression x + y and b
refers to x*y when I multiply these two I get a new expression x*y*(x
+ y). This new expression is created by operator overloading.
Specifically SymPy's Expr class has a __mul__ method that does this
but that's more detail than you need.

I can also create equation (Eq) objects as in:

In [9]: z = Eq(x, 2*y)

In [10]: z
Out[10]: x = 2⋅

This creates a new equation object. You can pass that object to some
SymPy functions that will know how to interpret it for example if you
ask the solve function to to solve the equation for y:

In [11]: solve(z, y)
Out[11]:
⎡x⎤
⎢─⎥
⎣2⎦

However creating the equation object does not in itself cause SymPy to
understand *in general* that there is a relationship between x and y.
SymPy only looks at the equation object you have created if you pass
that object (e.g. z) to some SymPy function.

> I took things a little farther:
>
> q,r,s = symbols('q r s')

Here you create two symbols q and r which you assign to the Python
variables q and r. That's reasonable except that...

> q = x+y
> r = x*y

now you've reassigned the Python variables q and r to be different
expression objects. There was no need to create the symbols q and r
earlier if this was the intention.

> print(q*r)
> q*r
> s = q*r + 1
> s
> s.subs(x,3)
>
> Everything worked.

Great!

> Is it the case that I made things overly complicated from the beginning?

I think so.

> I'm confused. I don't know how Sympy works, and would appreciate a better 
> description than the tutorial.

Can you point to a particular part of the tutorial that is confusing?
That would help to improve it.

Generally it is a lot easier to understand SymPy if you are
experienced with Python. A lot of our users are new to both Python and
SymPy and I think that makes it hard to explain what's going on. Some
things would be cleaner for users if SymPy was not embedded within
Python and can be confusing unless you already know Python well and
can see why things are the way they are.

--
Oscar

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAHVvXxTMGzhk3FBwtUo8seu-jGCc91m5u21Hwi-ektTUidQc_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Newbie: display product

2019-07-13 Thread Gary Pajer
Oscar,

That does seem to do what I want ... I think.
What's the difference between this and Chris Smith's answer?   I think I 
made a symbolic equation between symbols.  Didn't you make a *pythonic*  
assignment?   Then python did the right thing when using the multiplication 
operation '*' (by overloading?)   

I took things a little farther:

q,r,s = symbols('q r s')
q = x+y
r = x*y
print(q*r)
q*r
s = q*r + 1
s
s.subs(x,3)

Everything worked. Is it the case that I made things overly complicated 
from the beginning?  I'm confused.  I don't know how Sympy works, and would 
appreciate a better description than the tutorial.

Thanks.

On Saturday, July 13, 2019 at 7:00:32 AM UTC-4, Oscar wrote:
>
> Hi Gary, 
>
> I wonder if we are overcomplicating things here. Does this do what you 
> want? 
>
> x, y = symbols('x, y') 
> a = x + y 
> b = x * y 
> print(a * b) 
>
> -- 
> Oscar 
>
> On Tue, 9 Jul 2019 at 03:11, Gary Pajer > 
> wrote: 
> > 
> > I'm sure I'm not the first person having trouble getting started.  If 
> there is a good tutorial, more detailed than the sympy docs tutorial, 
> please point me to it! 
> > 
> > I want to display the product of two expressions.  Suppose I have 
> > 
> > a, b, x, y = symbols('a b x y') 
> > ex1 = Eq(a, x + y) 
> > ex2 = Eq(b, x * y) 
> > 
> > How do I display a * b in terms of x and y? 
> > 
> > Thainks. 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "sympy" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to sy...@googlegroups.com . 
> > To post to this group, send email to sy...@googlegroups.com 
> . 
> > Visit this group at https://groups.google.com/group/sympy. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/2a6226b4-0928-4753-a691-a659a9035072%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/8de86548-0ff4-4848-bd8b-7de3bb5ba5ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] simplifying large boolean expressions/equations

2019-07-13 Thread Oscar Benjamin
Can you show a (short) example of some code that you've tried?

‪On Sun, 7 Jul 2019 at 17:18, ‫רועי גרמיזו‬‎  wrote:‬
>
>  Hi, what is the best way to simplify a boolean equation with more than 8 
> variables? setting force to true on simplify_logic just takes too long, and 
> to_dnf sometimes takes too long or don't really change the expression. I 
> don't necessarily have to use sympy, but I belive it is the best (or least 
> worst) option for me right now
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/1f2681fc-4973-4375-8839-819ac58e9112%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAHVvXxQvm%3DPuDo_X3ZWGfbcGLokBNvNyy29bWfFRZ6QDt1B0%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Introduction and SymPy graphical scratchpad

2019-07-13 Thread Tomasz Pytel
Thanks, I may look into that but for now I am just starting out with SymPy 
and so am learning it by writing this app as well as doing some bugfixes 
for it... :)

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/9eb5fa99-3bf8-4838-b455-c4753c04d862%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Introduction and SymPy graphical scratchpad

2019-07-13 Thread Aaron Meurer
Thank you, that looks cool. I think some of the stuff here would be
useful to integrate into SymPy Gamma
https://github.com/sympy/sympy_gamma.

Aaron Meurer

On Fri, Jul 5, 2019 at 8:51 PM Tomasz Pytel  wrote:
>
> Hi all, an introduction first as requested per etiquette: I have been 
> programming since the early 90s and coding Python specifically since 2001. I 
> am a dirty uneducated high school dropout but since math is fun I've studied 
> up to basic PDEs, vector calculus, linalg, some complex analysis and abstract 
> algebra. I wound up looking into SymPy after playing with my own CAS (just to 
> learn) and getting up to polynomial factoring before deciding to adapt the 
> front end for something a little more complete (SymPy :)
>
> I am posting to present my project for consideration to be included in the 
> list of projects using SymPy, which is esentially a graphical front-end / 
> calculator / scratchpad for SymPy. It is at an early stage but functional 
> enough to be useful for anyone doing a lot of math I think. Bug reports, 
> feedback and suggestions are welcome of course.
>
> The project is called SymPad and is available on GitHub at: 
> https://github.com/Pristine-Cat/SymPad
>
> Thank you...
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/08f4564c-a6ad-4b9b-a684-9a9cde65f4eb%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6KB19HjTaHE%2B5%3DTXtnu1JBHtyK19iwz332euJ-xxyjJfg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Re Problems with plotting

2019-07-13 Thread Aaron Meurer
I would suggest installing Python via Anaconda. That will include
matplotlib as well as many other tools that are useful when working
with SymPy, such as jupyter.

Aaron Meurer

On Fri, Jul 12, 2019 at 8:41 AM David Bailey  wrote:
>
> (I forgot to send this reply to the group)
> On 12/07/2019 13:41, Jean ABOU SAMRA wrote:
> > Hi David,
> > Does this simple code work?
> >
> > import matplotlib.pyplot as plt
> > plt.plot([0, 1], [2, 3])
> > plt.show()
> >
> Thanks for that quick response. Here is what I get using that code:
>
> Traceback (most recent call last):
>   File "C:\PythonTests\SymPyWorkbook\t1.py", line 1, in 
> import matplotlib.pyplot as plt
>   File "C:\PythonSystem\lib\site-packages\matplotlib\pyplot.py", line 2372, 
> in 
> switch_backend(rcParams["backend"])
>   File "C:\PythonSystem\lib\site-packages\matplotlib\pyplot.py", line 207, in 
> switch_backend
> backend_mod = importlib.import_module(backend_name)
>   File "C:\PythonSystem\lib\importlib\__init__.py", line 127, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File 
> "C:\PythonSystem\lib\site-packages\matplotlib\backends\backend_tkagg.py", 
> line 1, in 
> from . import _backend_tk
>   File 
> "C:\PythonSystem\lib\site-packages\matplotlib\backends\_backend_tk.py", line 
> 5, in 
> import tkinter as Tk
> ModuleNotFoundError: No module named 'tkinter'
>
> I therefore tried to install mathplotlib
>
> ...\Scripts>pip install mathplotlib
> Collecting mathplotlib
>   ERROR: Could not find a version that satisfies the requirement mathplotlib 
> (from versions: none)
> ERROR: No matching distribution found for mathplotlib
>
>
> I am using Python 3.7 in 64 bits and SymPy 1.4
>
> David
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/b4c6138b-6553-707e-738f-739e4c2fc3cc%40dbailey.co.uk.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6K73%3DXeeyXQNWmiezsoYivWtmmVj9bpg21AvJwbjnJQqw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Newbie: display product

2019-07-13 Thread Oscar Benjamin
Hi Gary,

I wonder if we are overcomplicating things here. Does this do what you want?

x, y = symbols('x, y')
a = x + y
b = x * y
print(a * b)

--
Oscar

On Tue, 9 Jul 2019 at 03:11, Gary Pajer  wrote:
>
> I'm sure I'm not the first person having trouble getting started.  If there 
> is a good tutorial, more detailed than the sympy docs tutorial, please point 
> me to it!
>
> I want to display the product of two expressions.  Suppose I have
>
> a, b, x, y = symbols('a b x y')
> ex1 = Eq(a, x + y)
> ex2 = Eq(b, x * y)
>
> How do I display a * b in terms of x and y?
>
> Thainks.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/2a6226b4-0928-4753-a691-a659a9035072%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAHVvXxSVN5f_-BNXgBda%3DWrRhbEiF9nc%2B32oCjDOT_6HGoQvwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Problems with plotting

2019-07-13 Thread Jean ABOU SAMRA


> Le 12 juil. 2019 à 22:47, David Bailey  a écrit :
> 
> On 12/07/2019 14:48, Jean ABOU SAMRA wrote:
> 
> Cough. It's more complicated than I thought at first.
> Thank you! Amazingly, all that worked first time - I certainly would not have 
> stumbled upon that solution on my own! Pip did the job, I did not need to use 
> a variant:
> 
Great! Glad you solved your problem.
> pip --version
> pip 19.1.1 from c:\pythonsystem\lib\site-packages\pip (python 3.7)
> 
That's fine. I said this because on some systems (mostly Unix), `pip` refers to 
pip being used on Python 2 and pip with Python 3 has to be referred to as pip3. 
Many users get confused, so it's always worth a check.
> Tell me, if I want to create an application for others to use, I'd certainly 
> not want everyone to have to go through that procedure. Do I take it that I 
> can put a suitably configured Python directory in a subdirectory of the 
> directory containing the application so that my code will run out of the box 
> (so to speak)?
> 
You can surely do that. You will have to execute Python from the right place. 
But there are some problems, especially the fact that the methods to do that 
vary depending on the client OS. Fortunately, there are some tools around that 
will help you (keep reading).
> Also are there any legal complications to doing that?
> 
There aren't any because Python is free and open source software and the Python 
license explicitly states that you have the right to "to reproduce, analyze, 
test, perform and/or display publicly, prepare derivative works, distribute, 
and otherwise use Python".
> I take it more than one backend can be installed and selected by the 
> matplotlib.use() instruction?
> 
All matplotlib backends ship with matplotlib, they don't have to be "installed" 
but some of them have dependencies that you have to install. To use TkAgg, you 
need Tk, PyQt5 to use Qt5Agg, wxpython to use WXAgg, and so on. Then, you tell 
matplotlib which one you prefer. As 
https://matplotlib.org/faq/usage_faq.html#what-is-a-backend 
 specifies, there 
are several methods to do this. You can set your default backend, and you can 
also tell matplotlib that this script absolutely requires this backend whatever 
the default is throug the matplotlib.use() function.
> OK - I certainly don't want to sound grudging after helping me like that, but 
> I guess this forum is concerned with ways to improve sympy as much as 
> possible, so here goes.
> 
> Can't this all be tidied up a bit - users must hit this problem very often. 
> In fact I thought I did everything in a completely standard way - I 
> downloaded and installed Pyethon3.7, installed sympy and (I remember now) 
> installed matplotlib. Is there any reason why that should not work by default?
> 
It's a bit more complicated than this because Tk is a separate tool but it has 
to be detected at compile time. PyQt5 (a binding for the Qt5 framework) doesn't 
have this issue. Though, I'm quite puzzled because I thought that starting from 
3.7, Python would always include a suitable Tk. I agree that tkinter is 
surprisingly difficult to install -- as https://wiki.python.org/moin/TkInter 
 shows.
> Surely if a suitable backend is not available, the system could detect this 
> and emit a meaningful error message - or better still attempt to download and 
> install the necessary files (rather as Latex does), and then continue?
> 
There is better.
First, you can always specifiy PyQt5 as a dependency to your application in 
addition to SymPy and matplotlib. If your project is installable via pip (ie 
you put it on PyPI) then it's easy to tell what dependencies your app relies on 
and they will be automatically installed with it.
Additionally, 'm not a specialist but you certainly want to use a Python 
virtual environment using the virtualenv module. Your idea of putting a Python 
executable inside your application is quite like this. A virtual environment is 
an Python environment that you can separate from your system. An environment is 
a version of Python, and separate packages each with its version.
This way, you can manage to have PyQt5 installed locally (so any people copying 
the directory will get the right PyQt5 with it) and force the backend to be 
Qt5Agg -- through matplotlib.use() -- so everything runs smoothly.

Kind regards,
Jean Abou Samra.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/6F25DF23-D39A-4C10-AC2E-2787CE500D17%40abou-samra.fr.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Newbie

2019-07-13 Thread Oscar Benjamin
Hi Tanvi,

It's great that you want to contribute!

Take a look here (I guess you already did):
https://github.com/sympy/sympy/wiki/introduction-to-contributing

Every part of SymPy can be improved in some way. You mention matrices
- there is a lot of work going on for matrices and many issues:
https://github.com/sympy/sympy/issues?utf8=%E2%9C%93=is%3Aopen+is%3Aissue+label%3Amatrices
https://github.com/sympy/sympy/issues?utf8=%E2%9C%93=is%3Aopen+is%3Aissue+label%3Amatrices.expressions

Also for calculus, are you familiar with differential equations? There
are lots of issues for those:
https://github.com/sympy/sympy/issues?utf8=%E2%9C%93=is%3Aopen+is%3Aissue+label%3Asolvers.dsolve

I would suggest to familiarise yourself with the parts of SymPy you
might want to work on and then find the easiest possible issue to work
on. You can ask on the issue to check if anyone else is working on it
and to confirm that it is easy. Some are marked "easy to fix" or "good
first issue" but sometimes those labels can be misleading...
https://github.com/sympy/sympy/issues?utf8=%E2%9C%93=is%3Aopen+is%3Aissue+label%3A%22Easy+to+Fix%22+
https://github.com/sympy/sympy/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

--
Oscar

On Fri, 12 Jul 2019 at 10:06, Tanvi Singhal  wrote:
>
> I am Tanvi Singhal, a 4th year undergraduate from IIT Roorkee, India. I am 
> pursuing an Int. Mtech degree in Geology. I know basics of Python and I have 
> read Sympy Tutorial. I am familiar with calculus, trigonometry, Matrices and 
> I want to contribute. I found sympy perfect for Maths lovers. I would be glad 
> if you can guide me on how to proceed.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/52b74ef0-3156-4c57-9ac6-fd51f3e85ea1%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAHVvXxQ_ojzt5mp1nkmkUnL6W%3DgCJdopWRy2oE_tnyqjg%3DMVcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.