[sympy] Re: GSoC-19 Proposal : Series and Expansion

2019-03-28 Thread Nabanita Dash
I have added my application in wiki page . The link to which is 
https://github.com/sympy/sympy/wiki/GSoC-2019-Nabanita-Dash:Series-expansions:Improving-rs_series,Formal-Power-Series(series.formal),limits(series.limits)

On Wednesday, March 27, 2019 at 5:37:47 PM UTC+5:30, Nabanita Dash wrote:
>
>  Hi,
> This is a GSoC-19 aspirant.I am a 2nd year CS Undergrad from 
> IIIT,BBSR,India. I want to work on the project idea of Series-Expansion.I 
> had discussed with Sartaj Singh as said by Aaron Meurer to geta hold on the 
> idea.My proposed ideas are as below:
> !)Improve rs_series module
> I plan to add fourier,taylor,maclaurian,dirichlet,stirling series and 
> other hyperbolic series in rs_series to make it efficient to use.
> 2)Improve Formal Power Series
> a)The limits applied to check fps and calculate logarithmic singularity 
> needs improvement as it creates XFAIL tests.I want to create an API that 
> accepts the singularities points and revise it to give positive results.
> >>>f = asech(x)  
> >>>fps(f, x) 
> log(2) - log(x) - x**2/4 - 3*x**4/64 + O(x**6)
>  A logarithmic singularity is a singularity of an analytic function whose 
> main z-dependent term is of order O(lnz). An example is the singularity of 
> the Bessel function of the second kind
> Y_0(z)∼(2gamma)/pi+2/piln(1/2z)+... at z=0
> ,Green function and some trignometric functions.
>
> Singularities with leading term consisting of nested logarithms, e.g., 
> lnlnlnz, are also considered logarithmic.
> 3) Improve limits
> I think of adding special functions for calculating limits at oo. 
> https://github.com/sympy/sympy/issues/14590 according to no special 
> functions have been used in limits code.
>
> def test_exponential2():
> n = Symbol('n')
> assert limit((1 + x/(n + sin(n)))**n, n, oo) == exp(x)
> Also,I plan to calculate limits at multivariate points.In SymP, 
> limit(a,z,z0,dir='+') is possible to calculate limits for a single variable 
> z,I want to calculate limit(f(x,y),x,y,x0,y0,dir='+')
>
>
> I need suggestions to work on these ideas as well as any changes to be 
> made to these or propose any other idea is welcome.
>
>

-- 
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/899be730-13ba-4f23-93bf-c5eba768a998%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Re: Proposal for Linear Algebra: Tensor core (Looking for the mentor)

2019-03-28 Thread Aaron Meurer
I think the way to do this is to have operations on array objects that
don't evaluate by default. This would be very similar to the matrix
expressions code, where something like MatMul or MatAdd doesn't
evaluate, even on explicit matrices, unless you call doit() on it
(doit() is what SymPy generally calls your evaluate()).

The actual array type would be the same. The thing that needs to be
lazy is the operation, not the array itself.

Aaron Meurer

On Thu, Mar 28, 2019 at 5:01 PM  wrote:
>
> Hello Aaron,
>
> I found the Indexed class that you talked about.  In my opinion, there is a 
> difference between Indexed and Lazyarray. The Indexed is an abstraction of 
> mathematical object with indices, that is a model to represent the tensor in 
> general; while the lazy array is to perform a lazy evaluation for the array 
> operators in order to reduce the time or memory cost. The goal is different. 
> But I am not sure if this will be a redundancy once we have a global look at 
> Tensor module. I would like to listen to your opinion. :-)
>
> 在 2019年3月28日星期四 UTC+1下午7:41:47,Aaron Meurer写道:
>>
>> Can you clarify what a lazy array would look like? I think this may already 
>> be implemented as Indexed.
>>
>> Aaron Meurer
>>>
>>>
> --
> 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/23f71da1-d854-4325-b3c0-5e0ce322854f%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%3D6KTwT9E7NntkL5xdfwqLpbpjewCXNuAZVh%2BLnT2B_VfGQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Re: Proposal for Linear Algebra: Tensor core (Looking for the mentor)

2019-03-28 Thread zhiqikang
Hello Aaron,

I found the Indexed class that you talked about.  In my opinion, there is a 
difference between Indexed and Lazyarray. The Indexed is an abstraction of 
mathematical object with indices, that is a model to represent the tensor 
in general; while the lazy array is to perform a lazy evaluation for the 
array operators in order to reduce the time or memory cost. The goal is 
different. But I am not sure if this will be a redundancy once we have a 
global look at Tensor module. I would like to listen to your opinion. :-) 

在 2019年3月28日星期四 UTC+1下午7:41:47,Aaron Meurer写道:
>
> Can you clarify what a lazy array would look like? I think this may 
> already be implemented as Indexed.
>
> Aaron Meurer
>
>>
>>

-- 
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/23f71da1-d854-4325-b3c0-5e0ce322854f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Re: Proposal for Linear Algebra: Tensor core (Looking for the mentor)

2019-03-28 Thread zhiqikang
Hello Aaron,

I am thinking about something like this: 

class Lazyarray(object):
>
> """
>
> Lazy-evaluated array
>
> """
>
>def __init__(self, array):
>
> """
>
> Initiate a Lazyarray with an array
>
> """
>
> self.operations = []
>
> def evaluate(self, f=None):
>
> """
>
> Evaluate all operations stored in the operations list.If parameter 'f'
>
> is None then evaluate all operations, otherwise evaluate only the
>
> function 'f' 
>
> Some functions will use generator object for some iteration purposes 
>
> in order to save the memory cost
>
> """
>
>
>> def _add_operation(self, op):
>
> """
>
> Add an operation to the list of operations
>
> """
>
> def sum():
>
> """
>
> Add the operator Sum to the list of operations, transparent to the users
>
> """
>
> def _sum()
>
> """
>
> An inner function that will be called by evaluate() to perform a sum. A 
>
> real implementation of sum operator.
>
> """
>
> Will it be valide? Or it is already implemented?

-- 
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/33327315-8e87-4287-940e-beb0f69d17da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Re: Gsoc'19 Bond graph Tools idea

2019-03-28 Thread Jason Moore
FYI there is a bond graph latex package:
https://ctan.math.illinois.edu/macros/latex/contrib/bondgraphs/bondgraphs.pdf

I would suggest not focusing on a GUI, that can be an "icing on the cake"
part of your proposal, but the main goal would be designing a very nice API
for constructing the graphs using python code and parsing the graphs into
nonlinear and linear ordinary and differential algebraic equations.

Jason
moorepants.info
+01 530-601-9791


On Thu, Mar 28, 2019 at 11:13 AM Aaron Meurer  wrote:

> Such a library would ideally be designed so that it could have
> multiple GUI frontends, but I agree with Jason that the priority
> should be a web-based tool, specifically one that can be used in the
> Jupyter notebook.
>
> Output to LaTeX would probably be useful as well. One could also
> potentially reuse that for browser rendering. Here's a library I found
> that can render tikz in the browser, similar to MathJax,
> http://tikzjax.com/. And MathJax itself already supports certain
> things
> https://math.meta.stackexchange.com/questions/2324/how-to-draw-a-commutative-diagram
> .
>
> Aaron Meurer
>
> On Thu, Mar 28, 2019 at 10:05 AM Jason Moore  wrote:
> >
> > Arooshi,
> >
> > The bond graph module would need to be created first, which will likely
> be an entire summer project. As for a gui, tkinter could be used, but most
> scipy related projects are utilizing web based gui toolkits.
> >
> > Jason
> > moorepants.info
> > +01 530-601-9791
> >
> >
> > On Wed, Mar 27, 2019 at 8:54 PM Arooshi Verma <
> arooshiverma0...@gmail.com> wrote:
> >>
> >> Hi !
> >> I was going through various ways I can provide a GUI for the upcoming
> Bond Graph Tools project and came across Tkinter- (
> https://docs.python.org/2/library/tkinter.html),(
> https://docs.python.org/2/library/tkinter.html).
> >>
> >> Wondering if this can be used? We can make something like a grid with
> each cell as a node/junction(1/0) and an option to connect various junction.
> >>
> >> Would love feedback from all regarding the same.
> >> Thanks !
> >>
>

-- 
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/CAP7f1AgkWgW005yO-RuoYpQm%2Bd2tpwwDTBQPvCifk%2BEV5%3D2Bsg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Re: GSoC-19 Proposal : Series and Expansion

2019-03-28 Thread Jason Moore
I recommend writing your proposal on the wiki and then asking for comments.

Jason
moorepants.info
+01 530-601-9791


On Thu, Mar 28, 2019 at 10:27 AM Nabanita Dash 
wrote:

> I have already gone through it. Can you please go through my ideas and
> suggest something if there is an error
>
> On Thu 28 Mar, 2019, 10:02 PM Jason Moore,  wrote:
>
>> Sorry, wrong link:
>> https://github.com/sympy/sympy/wiki/GSoC-2019-Student-Instructions
>>
>> Jason
>> moorepants.info
>> +01 530-601-9791
>>
>>
>> On Thu, Mar 28, 2019 at 9:10 AM Jason Moore  wrote:
>>
>>> Nabanita,
>>>
>>> Welcome to SymPy, thanks for the PRs. If you haven't seen
>>> https://github.com/sympy/sympy_benchmarks, be sure to read through the
>>> info there.
>>>
>>> Jason
>>> moorepants.info
>>> +01 530-601-9791
>>>
>>>
>>> On Wed, Mar 27, 2019 at 5:29 AM Nabanita Dash 
>>> wrote:
>>>
 I have 2 merged prs
 https://github.com/sympy/sympy/pull/16402
 https://github.com/sympy/sympy/pull/16198
 

 I am working on some other issues though not completely related to my
 project

 On Wednesday, March 27, 2019 at 5:37:47 PM UTC+5:30, Nabanita Dash
 wrote:
>
>  Hi,
> This is a GSoC-19 aspirant.I am a 2nd year CS Undergrad from
> IIIT,BBSR,India. I want to work on the project idea of Series-Expansion.I
> had discussed with Sartaj Singh as said by Aaron Meurer to geta hold on 
> the
> idea.My proposed ideas are as below:
> !)Improve rs_series module
> I plan to add fourier,taylor,maclaurian,dirichlet,stirling series and
> other hyperbolic series in rs_series to make it efficient to use.
> 2)Improve Formal Power Series
> a)The limits applied to check fps and calculate logarithmic
> singularity needs improvement as it creates XFAIL tests.I want to create 
> an
> API that accepts the singularities points and revise it to give positive
> results.
> >>>f = asech(x)
> >>>fps(f, x)
> log(2) - log(x) - x**2/4 - 3*x**4/64 + O(x**6)
>  A logarithmic singularity is a singularity of an analytic function
> whose main z-dependent term is of order O(lnz). An example is the
> singularity of the Bessel function of the second kind
> Y_0(z)∼(2gamma)/pi+2/piln(1/2z)+... at z=0
> ,Green function and some trignometric functions.
>
> Singularities with leading term consisting of nested logarithms, e.g.,
> lnlnlnz, are also considered logarithmic.
> 3) Improve limits
> I think of adding special functions for calculating limits at oo.
> https://github.com/sympy/sympy/issues/14590 according to no special
> functions have been used in limits code.
>
> def test_exponential2():
> n = Symbol('n')
> assert limit((1 + x/(n + sin(n)))**n, n, oo) == exp(x)
> Also,I plan to calculate limits at multivariate points.In SymP,
> limit(a,z,z0,dir='+') is possible to calculate limits for a single 
> variable
> z,I want to calculate limit(f(x,y),x,y,x0,y0,dir='+')
>
>
> I need suggestions to work on these ideas as well as any changes to be
> made to these or propose any other idea is welcome.
>
> --
 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/756926d5-f831-4a6c-864e-465e58528222%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/CAP7f1AgZZmE%3DUFectnAvbz61Cf5Xfe1HLC%3Dt_iiwzSEM558_hA%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 

Re: [sympy] Gsoc19 initial Proposal: Bond Graphs

2019-03-28 Thread Jason Moore
Arooshi,

I have no thoughts, as the information isn't detailed enough to comment.
Once you have a draft of a proposal I'm willing to check it out.

Jason
moorepants.info
+01 530-601-9791


On Thu, Mar 28, 2019 at 10:11 AM Arooshi Verma 
wrote:

> Hi
> I read through networkx API. I guess to make Bond Graphs, one needs to
> edit the digraph module (for directed graphs). I am planning about doing
> the following:
> 1. adding a parameter name while initializing a node such that All
> objects are assigned a unique numeric ID which is incremented every time a
> new element of the same type is added
> Example: When a C element is added, it is assigned name C0. When another
> C element is added, it is assigned name C1.
> 2. In the function add_edge(self, u_of_edge, v_of_edge, attr), passing
> the  pair as the edge's attributes
> 3. I have also worked on a function to calculate the state equations which
> I'll be putting in my proposal.
>
> I'll put my proposal up on the wiki page soon. What are your thoughts on
> this?
>
> Thanks
> Arooshi Verma
>
>
>
>
> On Thu, 28 Mar 2019 at 21:58, Arooshi Verma 
> wrote:
>
>> Thanks a lot!  I have already started writing the proposal. And yeah,  I
>> will check out the network API.
>>
>> Thanks again.
>> Arooshi
>>
>> On Thu, 28 Mar 2019, 21:54 Jason Moore,  wrote:
>>
>>> Arooshi,
>>>
>>> Start here if you haven't yet:
>>> https://github.com/sympy/sympy/wiki/GSoC-2019-Student-Instructions
>>>
>>> As far as Bond graphs I recommend checking out the networkx API and the
>>> steps to create bond graphs. Then write a proposal that explains what a
>>> user will type and what the output will be as a first start.
>>>
>>> Jason
>>> moorepants.info
>>> +01 530-601-9791
>>>
>>>
>>> On Fri, Mar 22, 2019 at 8:04 PM Arooshi Verma <
>>> arooshiverma0...@gmail.com> wrote:
>>>
 Hello,
 I am Arooshi Verma from IIT Bhubaneswar,India. I have already started
 contributing to Sympy. I have been among the top in my engineering
 mechanics class. Moreover, I have qualified a lot of Physics and
 Mathematics Olympiads.

 After going through the Gsoc ideas page, I got particularly interested
 in the project System Dynamics: Bond Graph Tools. I know how to work
 on Bond Graphs for many systems (mechanical,electrical etc.). I researched
 more about how to implement it using python and would like to start by
 doing the following:

 *New package: *This will consist the classes-
   1)node (attributes- name,
 value(eg. mass))
   2)edge (attributes-
 from(node), to(node), e(generalized flow), f(generalized effort) )
   3)constant_junction
 (attributes- value(0/1)
 *Getting the initial equations of motion:* We can generate the
 equations of motion using the properties of of 1 and 0 junctions. We'll
 write all the e/f values in terms of other e/f and/or node values

 *Solving the linear equations:* We can solve the linear equations
 using the solveset. We'll use solveset moving from the leaf nodes to the
 internal nodes so as to get the equations in the form of node values and
 differentials.

 I have gone through the different sympy modules.
 Since there's no ealier work on this, I would like some suggestions on
 how to proceed. I will submit the refined proposal based on the
 suggestions. I would love to know what the mentors think about the same.

 Thank you.
 Arooshi Verma

 --
 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/CAG48h5S0ZVvC9sSC8vNVU8aHONXFxSm7qpqXRwznufrf4H_Dfg%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/CAP7f1AiHYVvNhh%2BLqGXZRSs0k_FF4hcYsFTqqeYHH%3DK-8qpnvQ%40mail.gmail.com
>>> 

Re: [sympy] Re: Proposal for Linear Algebra: Tensor core (Looking for the mentor)

2019-03-28 Thread Aaron Meurer
Can you clarify what a lazy array would look like? I think this may already
be implemented as Indexed.

Aaron Meurer

On Thu, Mar 28, 2019 at 11:20 AM  wrote:

> (updated: Lazy operators)
>
> Ø  lazy operators on arrays
>
> lazy evaluation can improve the performance while iterating the array
> since it creates value only if it is called. To implement lazy operators, I
> am thinking about two plans:
>
> 1.  Create a new sub-module named lazy-array (larray) of which most
> of the operations are lazy evaluated. A standard Array can be cast to a
> lazy-array by simply calling the constructor of larray and passing it as
> parameter. By doing so, users can choose whatever they want in the module
> level.
>
>(Updated: a class diagram for Lazyarray.)
>
> [image: newmodule.PNG]
>
>
>
>
> 1.  Create a lazy version for les operators mentioned above. The lazy
> operators are accessible for a specific purpose. This implementation
> focusses on a function level for calling lazy evaluated operations.
>
>(Updated: a class diagram for the inner Lazyevaluation. Example
> brorrowed from Lazyevaluation
> 
> )
>
> [image: innerClass.PNG]
>
>
> (updated: analysis for this approaches)
>
> Personnally I think the 1) approach is better because this implementation
> can enable a independency between the existing Array module and the
> LazyArray. It will also benefit the test and maintenance for the LazyArray.
> I suppose that the Lazyarray to Array should be as Numpy to List, Lazyarray
> should be seen as a toolkit.
>
> But the disadvantage is that the mixte of standard Array and Lazyarray
> object may lead to some confusion.(e.g. Lazyarray.sum(Array()) should
> return a Lazyarray or Array object?) The problem can probably be solved by
> a convention like: afer casting an Array to Lazyarray, one would keep using
> Lazyarray. Of course if needed, the transformation from Lazyarray to Array
> should be provided at any time.
>
> Besides, the Lazy-evaluation should be transparent to the users, so that
> we are supposed to keep the naming convention to operators as we have for
> Array.
>
> --
> 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/0e7b466b-538b-4689-964a-86d4f66cfc3a%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%3D6%2BUHbGkM-Wbykrnj4Qdisd%3DNka-X3sHm8Ps4x9XBHgy%3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Re: Gsoc'19 Bond graph Tools idea

2019-03-28 Thread Aaron Meurer
Such a library would ideally be designed so that it could have
multiple GUI frontends, but I agree with Jason that the priority
should be a web-based tool, specifically one that can be used in the
Jupyter notebook.

Output to LaTeX would probably be useful as well. One could also
potentially reuse that for browser rendering. Here's a library I found
that can render tikz in the browser, similar to MathJax,
http://tikzjax.com/. And MathJax itself already supports certain
things 
https://math.meta.stackexchange.com/questions/2324/how-to-draw-a-commutative-diagram.

Aaron Meurer

On Thu, Mar 28, 2019 at 10:05 AM Jason Moore  wrote:
>
> Arooshi,
>
> The bond graph module would need to be created first, which will likely be an 
> entire summer project. As for a gui, tkinter could be used, but most scipy 
> related projects are utilizing web based gui toolkits.
>
> Jason
> moorepants.info
> +01 530-601-9791
>
>
> On Wed, Mar 27, 2019 at 8:54 PM Arooshi Verma  
> wrote:
>>
>> Hi !
>> I was going through various ways I can provide a GUI for the upcoming Bond 
>> Graph Tools project and came across Tkinter- 
>> (https://docs.python.org/2/library/tkinter.html),( 
>> https://docs.python.org/2/library/tkinter.html).
>>
>> Wondering if this can be used? We can make something like a grid with each 
>> cell as a node/junction(1/0) and an option to connect various junction.
>>
>> Would love feedback from all regarding the same.
>> Thanks !
>>

-- 
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%3D6KF4%2BVXJV%3D%2B%3DFB4wze7e2%3DvuzkZtj%3Drqxuc%2B9R53pukLA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] GSOC 2019 Idea: Python/C Parser for sympy

2019-03-28 Thread Aaron Meurer
On Wed, Mar 27, 2019 at 6:51 PM Nikhil Maan  wrote:
>
> Hello Ondrej,
>
> On Thursday, March 28, 2019 at 5:46:14 AM UTC+5:30, Ondřej Čertík wrote:
>>
>> Hi Nikhil,
>>
>>
>>
>> Depending on the application of this, it probably makes sense to use Clang 
>> to parse the C or C++ code and then go over the Clang AST and extract 
>> expressions from it and convert them to SymPy where it makes sense.
>>
>> Would you be interested in doing this (also) for Fortran? See these ideas:
>>
>> https://github.com/sympy/sympy/wiki/GSoC-2019-Ideas#lfortran-sympy-project-ideas
>>
>> especially the "Parsing Fortran code to SymPy". That would be something I 
>> would be very interested in, and yes, I would be happy to mentor it.
>>
>> Perhaps we could do both C and Fortran in your proposal. For C that would be 
>> relatively easy due to Clang. For Fortran you would use my LFortran 
>> compiler. There the parser actually requires some development. C already has 
>> a modern production open source compiler/parser (Clang), but Fortran doesn't 
>> yet, and that's one thing I am trying to fix with LFortran (see 
>> https://docs.lfortran.org/ for other motivation).
>>
>> On the SymPy side, we definitely want to do both C and Fortran, so this 
>> would naturally lead you to design a good interface that works for both. 
>> Similarly as our code generation interface works for both C and Fortran.
>>
>> If you are interested in developing a parser and semantic representation of 
>> the language so that this can be done, then Fortran actually would be a 
>> great choice because this is exactly where we need help with LFortran. While 
>> for C this has already been developed in Clang, so I would suggest to just 
>> use it.
>>
>> Let me know your interests, and we can discuss further details.
>>
>> Ondrej
>
>
>
> Hello Ondrej,
>
> Thank you for showing interest in my project. It will be an honor to work 
> with you on this project.
>
> I would love to include parsing Fortran in the proposal. I would like to help 
> as much as I can. Sympy has made doing mathematics so much convenient, 
> whatever I can do to make it more convenient for others, I will try my best.
>
> There was a dicussion i saw in a thread about being able to understand simple 
> instructions like 'integrate sin x over x' and convert them to sympy syntax. 
> That will be a long and complex task. But this project can be extended 
> further after fortran and C to understand natural language.
> But, for now first i would like to focus on Fortran and C first. I'll read 
> the clang and Lfortran documentation asap and start working on a plan.

Natural language parsing is a whole other beast. I would suggest
sticking to C and Fortran. A project to handle natural language
queries could easily fill a whole summer on its own.

Aaron Meurer

>
> I would also like to thank you for creating sympy. it made doing complex 
> mathematics so much better. Instead of just looking at some mix of keywords 
> and operators which is very hard to understand, we can actually see and 
> understand what we're doing.
>
> I'll get to work now
>
> Sincerely,
> Nikhil Maan
>
>
>
> --
> 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/36c4c6db-3f9c-4c38-a38c-227b9e183b2b%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%3D6%2B8DpW1Ffgg9mZxi9O_1ar6aZK4%3Dftg2NA72mnbeN9bow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Re: GSoC-19 Proposal : Series and Expansion

2019-03-28 Thread Nabanita Dash
I have already gone through it. Can you please go through my ideas and
suggest something if there is an error

On Thu 28 Mar, 2019, 10:02 PM Jason Moore,  wrote:

> Sorry, wrong link:
> https://github.com/sympy/sympy/wiki/GSoC-2019-Student-Instructions
>
> Jason
> moorepants.info
> +01 530-601-9791
>
>
> On Thu, Mar 28, 2019 at 9:10 AM Jason Moore  wrote:
>
>> Nabanita,
>>
>> Welcome to SymPy, thanks for the PRs. If you haven't seen
>> https://github.com/sympy/sympy_benchmarks, be sure to read through the
>> info there.
>>
>> Jason
>> moorepants.info
>> +01 530-601-9791
>>
>>
>> On Wed, Mar 27, 2019 at 5:29 AM Nabanita Dash 
>> wrote:
>>
>>> I have 2 merged prs
>>> https://github.com/sympy/sympy/pull/16402
>>> https://github.com/sympy/sympy/pull/16198
>>> 
>>>
>>> I am working on some other issues though not completely related to my
>>> project
>>>
>>> On Wednesday, March 27, 2019 at 5:37:47 PM UTC+5:30, Nabanita Dash wrote:

  Hi,
 This is a GSoC-19 aspirant.I am a 2nd year CS Undergrad from
 IIIT,BBSR,India. I want to work on the project idea of Series-Expansion.I
 had discussed with Sartaj Singh as said by Aaron Meurer to geta hold on the
 idea.My proposed ideas are as below:
 !)Improve rs_series module
 I plan to add fourier,taylor,maclaurian,dirichlet,stirling series and
 other hyperbolic series in rs_series to make it efficient to use.
 2)Improve Formal Power Series
 a)The limits applied to check fps and calculate logarithmic singularity
 needs improvement as it creates XFAIL tests.I want to create an API that
 accepts the singularities points and revise it to give positive results.
 >>>f = asech(x)
 >>>fps(f, x)
 log(2) - log(x) - x**2/4 - 3*x**4/64 + O(x**6)
  A logarithmic singularity is a singularity of an analytic function
 whose main z-dependent term is of order O(lnz). An example is the
 singularity of the Bessel function of the second kind
 Y_0(z)∼(2gamma)/pi+2/piln(1/2z)+... at z=0
 ,Green function and some trignometric functions.

 Singularities with leading term consisting of nested logarithms, e.g.,
 lnlnlnz, are also considered logarithmic.
 3) Improve limits
 I think of adding special functions for calculating limits at oo.
 https://github.com/sympy/sympy/issues/14590 according to no special
 functions have been used in limits code.

 def test_exponential2():
 n = Symbol('n')
 assert limit((1 + x/(n + sin(n)))**n, n, oo) == exp(x)
 Also,I plan to calculate limits at multivariate points.In SymP,
 limit(a,z,z0,dir='+') is possible to calculate limits for a single variable
 z,I want to calculate limit(f(x,y),x,y,x0,y0,dir='+')


 I need suggestions to work on these ideas as well as any changes to be
 made to these or propose any other idea is welcome.

 --
>>> 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/756926d5-f831-4a6c-864e-465e58528222%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/CAP7f1AgZZmE%3DUFectnAvbz61Cf5Xfe1HLC%3Dt_iiwzSEM558_hA%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/CAAXyjUpWqSYaRprBvappqKvmHNVwDUggdnODhBp7j3FVow8wGA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Re: Proposal for Linear Algebra: Tensor core (Looking for the mentor)

2019-03-28 Thread zhiqikang
(updated: Lazy operators)

Ø  lazy operators on arrays

lazy evaluation can improve the performance while iterating the array since 
it creates value only if it is called. To implement lazy operators, I am 
thinking about two plans:

1.  Create a new sub-module named lazy-array (larray) of which most of 
the operations are lazy evaluated. A standard Array can be cast to a 
lazy-array by simply calling the constructor of larray and passing it as 
parameter. By doing so, users can choose whatever they want in the module 
level. 

   (Updated: a class diagram for Lazyarray.) 

[image: newmodule.PNG]


 

1.  Create a lazy version for les operators mentioned above. The lazy 
operators are accessible for a specific purpose. This implementation 
focusses on a function level for calling lazy evaluated operations.

   (Updated: a class diagram for the inner Lazyevaluation. Example 
brorrowed from Lazyevaluation 

) 

[image: innerClass.PNG]


(updated: analysis for this approaches)

Personnally I think the 1) approach is better because this implementation 
can enable a independency between the existing Array module and the 
LazyArray. It will also benefit the test and maintenance for the LazyArray. 
I suppose that the Lazyarray to Array should be as Numpy to List, Lazyarray 
should be seen as a toolkit. 

But the disadvantage is that the mixte of standard Array and Lazyarray 
object may lead to some confusion.(e.g. Lazyarray.sum(Array()) should 
return a Lazyarray or Array object?) The problem can probably be solved by 
a convention like: afer casting an Array to Lazyarray, one would keep using 
Lazyarray. Of course if needed, the transformation from Lazyarray to Array 
should be provided at any time. 

Besides, the Lazy-evaluation should be transparent to the users, so that we 
are supposed to keep the naming convention to operators as we have for 
Array.

-- 
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/0e7b466b-538b-4689-964a-86d4f66cfc3a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Gsoc19 initial Proposal: Bond Graphs

2019-03-28 Thread Arooshi Verma
Hi
I read through networkx API. I guess to make Bond Graphs, one needs to edit
the digraph module (for directed graphs). I am planning about doing the
following:
1. adding a parameter name while initializing a node such that All objects
are assigned a unique numeric ID which is incremented every time a new
element of the same type is added
Example: When a C element is added, it is assigned name C0. When another C
element is added, it is assigned name C1.
2. In the function add_edge(self, u_of_edge, v_of_edge, attr), passing the
 pair as the edge's attributes
3. I have also worked on a function to calculate the state equations which
I'll be putting in my proposal.

I'll put my proposal up on the wiki page soon. What are your thoughts on
this?

Thanks
Arooshi Verma




On Thu, 28 Mar 2019 at 21:58, Arooshi Verma 
wrote:

> Thanks a lot!  I have already started writing the proposal. And yeah,  I
> will check out the network API.
>
> Thanks again.
> Arooshi
>
> On Thu, 28 Mar 2019, 21:54 Jason Moore,  wrote:
>
>> Arooshi,
>>
>> Start here if you haven't yet:
>> https://github.com/sympy/sympy/wiki/GSoC-2019-Student-Instructions
>>
>> As far as Bond graphs I recommend checking out the networkx API and the
>> steps to create bond graphs. Then write a proposal that explains what a
>> user will type and what the output will be as a first start.
>>
>> Jason
>> moorepants.info
>> +01 530-601-9791
>>
>>
>> On Fri, Mar 22, 2019 at 8:04 PM Arooshi Verma 
>> wrote:
>>
>>> Hello,
>>> I am Arooshi Verma from IIT Bhubaneswar,India. I have already started
>>> contributing to Sympy. I have been among the top in my engineering
>>> mechanics class. Moreover, I have qualified a lot of Physics and
>>> Mathematics Olympiads.
>>>
>>> After going through the Gsoc ideas page, I got particularly interested
>>> in the project System Dynamics: Bond Graph Tools. I know how to work on
>>> Bond Graphs for many systems (mechanical,electrical etc.). I researched
>>> more about how to implement it using python and would like to start by
>>> doing the following:
>>>
>>> *New package: *This will consist the classes-
>>>   1)node (attributes- name,
>>> value(eg. mass))
>>>   2)edge (attributes-
>>> from(node), to(node), e(generalized flow), f(generalized effort) )
>>>   3)constant_junction
>>> (attributes- value(0/1)
>>> *Getting the initial equations of motion:* We can generate the
>>> equations of motion using the properties of of 1 and 0 junctions. We'll
>>> write all the e/f values in terms of other e/f and/or node values
>>>
>>> *Solving the linear equations:* We can solve the linear equations using
>>> the solveset. We'll use solveset moving from the leaf nodes to the internal
>>> nodes so as to get the equations in the form of node values and
>>> differentials.
>>>
>>> I have gone through the different sympy modules.
>>> Since there's no ealier work on this, I would like some suggestions on
>>> how to proceed. I will submit the refined proposal based on the
>>> suggestions. I would love to know what the mentors think about the same.
>>>
>>> Thank you.
>>> Arooshi Verma
>>>
>>> --
>>> 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/CAG48h5S0ZVvC9sSC8vNVU8aHONXFxSm7qpqXRwznufrf4H_Dfg%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/CAP7f1AiHYVvNhh%2BLqGXZRSs0k_FF4hcYsFTqqeYHH%3DK-8qpnvQ%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 

Re: [sympy] Re: GSoC-19 Proposal : Series and Expansion

2019-03-28 Thread Jason Moore
Sorry, wrong link:
https://github.com/sympy/sympy/wiki/GSoC-2019-Student-Instructions

Jason
moorepants.info
+01 530-601-9791


On Thu, Mar 28, 2019 at 9:10 AM Jason Moore  wrote:

> Nabanita,
>
> Welcome to SymPy, thanks for the PRs. If you haven't seen
> https://github.com/sympy/sympy_benchmarks, be sure to read through the
> info there.
>
> Jason
> moorepants.info
> +01 530-601-9791
>
>
> On Wed, Mar 27, 2019 at 5:29 AM Nabanita Dash 
> wrote:
>
>> I have 2 merged prs
>> https://github.com/sympy/sympy/pull/16402
>> https://github.com/sympy/sympy/pull/16198
>> 
>>
>> I am working on some other issues though not completely related to my
>> project
>>
>> On Wednesday, March 27, 2019 at 5:37:47 PM UTC+5:30, Nabanita Dash wrote:
>>>
>>>  Hi,
>>> This is a GSoC-19 aspirant.I am a 2nd year CS Undergrad from
>>> IIIT,BBSR,India. I want to work on the project idea of Series-Expansion.I
>>> had discussed with Sartaj Singh as said by Aaron Meurer to geta hold on the
>>> idea.My proposed ideas are as below:
>>> !)Improve rs_series module
>>> I plan to add fourier,taylor,maclaurian,dirichlet,stirling series and
>>> other hyperbolic series in rs_series to make it efficient to use.
>>> 2)Improve Formal Power Series
>>> a)The limits applied to check fps and calculate logarithmic singularity
>>> needs improvement as it creates XFAIL tests.I want to create an API that
>>> accepts the singularities points and revise it to give positive results.
>>> >>>f = asech(x)
>>> >>>fps(f, x)
>>> log(2) - log(x) - x**2/4 - 3*x**4/64 + O(x**6)
>>>  A logarithmic singularity is a singularity of an analytic function
>>> whose main z-dependent term is of order O(lnz). An example is the
>>> singularity of the Bessel function of the second kind
>>> Y_0(z)∼(2gamma)/pi+2/piln(1/2z)+... at z=0
>>> ,Green function and some trignometric functions.
>>>
>>> Singularities with leading term consisting of nested logarithms, e.g.,
>>> lnlnlnz, are also considered logarithmic.
>>> 3) Improve limits
>>> I think of adding special functions for calculating limits at oo.
>>> https://github.com/sympy/sympy/issues/14590 according to no special
>>> functions have been used in limits code.
>>>
>>> def test_exponential2():
>>> n = Symbol('n')
>>> assert limit((1 + x/(n + sin(n)))**n, n, oo) == exp(x)
>>> Also,I plan to calculate limits at multivariate points.In SymP,
>>> limit(a,z,z0,dir='+') is possible to calculate limits for a single variable
>>> z,I want to calculate limit(f(x,y),x,y,x0,y0,dir='+')
>>>
>>>
>>> I need suggestions to work on these ideas as well as any changes to be
>>> made to these or propose any other idea is welcome.
>>>
>>> --
>> 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/756926d5-f831-4a6c-864e-465e58528222%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/CAP7f1AgZZmE%3DUFectnAvbz61Cf5Xfe1HLC%3Dt_iiwzSEM558_hA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Gsoc19 initial Proposal: Bond Graphs

2019-03-28 Thread Jason Moore
Arooshi,

Start here if you haven't yet:
https://github.com/sympy/sympy/wiki/GSoC-2019-Student-Instructions

As far as Bond graphs I recommend checking out the networkx API and the
steps to create bond graphs. Then write a proposal that explains what a
user will type and what the output will be as a first start.

Jason
moorepants.info
+01 530-601-9791


On Fri, Mar 22, 2019 at 8:04 PM Arooshi Verma 
wrote:

> Hello,
> I am Arooshi Verma from IIT Bhubaneswar,India. I have already started
> contributing to Sympy. I have been among the top in my engineering
> mechanics class. Moreover, I have qualified a lot of Physics and
> Mathematics Olympiads.
>
> After going through the Gsoc ideas page, I got particularly interested in
> the project System Dynamics: Bond Graph Tools. I know how to work on Bond
> Graphs for many systems (mechanical,electrical etc.). I researched more
> about how to implement it using python and would like to start by doing the
> following:
>
> *New package: *This will consist the classes-
>   1)node (attributes- name,
> value(eg. mass))
>   2)edge (attributes-
> from(node), to(node), e(generalized flow), f(generalized effort) )
>   3)constant_junction
> (attributes- value(0/1)
> *Getting the initial equations of motion:* We can generate the equations
> of motion using the properties of of 1 and 0 junctions. We'll write all the
> e/f values in terms of other e/f and/or node values
>
> *Solving the linear equations:* We can solve the linear equations using
> the solveset. We'll use solveset moving from the leaf nodes to the internal
> nodes so as to get the equations in the form of node values and
> differentials.
>
> I have gone through the different sympy modules.
> Since there's no ealier work on this, I would like some suggestions on how
> to proceed. I will submit the refined proposal based on the suggestions. I
> would love to know what the mentors think about the same.
>
> Thank you.
> Arooshi Verma
>
> --
> 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/CAG48h5S0ZVvC9sSC8vNVU8aHONXFxSm7qpqXRwznufrf4H_Dfg%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/CAP7f1AiHYVvNhh%2BLqGXZRSs0k_FF4hcYsFTqqeYHH%3DK-8qpnvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Proposal for Linear Algebra: Tensor core (Looking for the mentor)

2019-03-28 Thread Jason Moore
Francesco is the most knowledgeable about this subject.

Jason
moorepants.info
+01 530-601-9791


On Thu, Mar 28, 2019 at 9:24 AM  wrote:

> Hello Jason,
>
> Thank you! It seems that you are quite busy now greeting to the newbies.
> :-)
> I am waiting for someone to review my proposal. Could you please tell me
> to whom I should reach out?
>
> Regards,
> Zhiqi
>
> 在 2019年3月28日星期四 UTC+1下午5:14:46,Jason Moore写道:
>>
>> Zhiqi,
>>
>> This looks well thought out a first glance. Check out
>> https://github.com/sympy/sympy/wiki/GSoC-2019-Student-Instructions if
>> you haven't yet.
>>
>> Jason
>> moorepants.info
>> +01 530-601-9791
>>
>>
>> On Wed, Mar 27, 2019 at 12:13 AM  wrote:
>>
>>> Hello,
>>>
>>>
>>> My name is Zhiqi KANG, I am a 4th year undergraduate of a 5-year
>>> engineering institution: Université de Technologie de Compiègne, France. I
>>> am interested in the project Linear algebra: Tensor core.Here is the link
>>> for the description of project idea.
>>> https://github.com/sympy/sympy/wiki/GSoC-2019-Ideas#linear-algebra-tensor-core
>>>  Even
>>> though I am not very familiar with the tensor in the physical field, its
>>> principal in the mathematical field is quite interesting. I have
>>> precisely looked at the requirement of this project and make sure that I am
>>> capable to accomplish most of its task. However, there are still many
>>> questions that I would like to discuss with all contributors of SymPy and
>>> expecially with the mentor. One urgent problem is that I don't find the
>>> name of mentor for this project, so I don't really know who I should CC.
>>> Could you please help me to find the mentor for this project?
>>>
>>>
>>> Please review this draft proposal and tell me what to be ameliorated.
>>> Thank you!
>>>
>>>
>>>
>>> Ø  Better Algorithms for sparse array:
>>>
>>> The idea is to manipulate directly les arrays in the sparse array level.
>>> Casting sparse arrays to a dense array and then operating is kind of a
>>> redundancy. I have found an example in tomatrix() function of
>>> sympy\sympy\tensor\array\sparse_ndim_array.py where we convert the
>>> sparse_array to a new dictionay and then cast it to matrix.(Code bellow)
>>>
>>> But I cannot find more cases in the array/tensor module, it would be
>>> great if some one can help me find out where other cases are.
>>>
>>>
>>> from sympy.matrices import SparseMatrix
>>>
>>> if self.rank() != 2:
>>>
>>>   raise ValueError('Dimensions must be of size of 2')
>>>
>>> mat_sparse = {}
>>>
>>> for key, value in self._sparse_array.items():
>>>
>>>   mat_sparse[self._get_tuple_index(key)] = value
>>>
>>> return SparseMatrix(self.shape[0], self.shape[1], mat_sparse)
>>>
>>>
>>>
>>> Ø  NumPy-like operations
>>>
>>> We have now some operations for arrays in SymPy:
>>>
>>> ²  arrayfy
>>>
>>> ²  tensor product
>>>
>>> ²  derivatives by array
>>>
>>> ²  permute dimension
>>>
>>> ²  contraction
>>>
>>> For this part of project, I am planning to implement some operations
>>> such as:
>>>
>>> ²  sum
>>>
>>> ²  divide/multiply(element wise)
>>>
>>> ²  any
>>>
>>> ²  comparators(greater/less/equal)
>>>
>>> ²  logical operator(and/or/not/xor)
>>>
>>> ²  random
>>>
>>>
>>>
>>> Ø  lazy operators on arrays
>>>
>>> lazy evaluation can improve the performance while iterating the array
>>> since it creates value only if it is called. To implement lazy operators, I
>>> am thinking about two plans:
>>>
>>> 1.  Create a new sub-module named lazy-array (larray) of which most
>>> of the operations are lazy evaluated. A standard Array can be cast to a
>>> lazy-array by simply calling the constructor of larray and passing it as
>>> parameter. By doing so, users can choose whatever they want in the module
>>> level, which means that to manipulate a simple array or a lazy array.
>>>
>>>
>>>
>>> 1.  Create a lazy version for les operators mentioned above. The
>>> lazy operators are accessible for a specific purpose. This implementation
>>> focusses on a function level for calling lazy evaluated operations, which
>>> means to call a simple inverse_matrix function or a lazy one.
>>>
>>>
>>>
>>> Besides, I have found in sympy\sympy\tensor\tensor.py a class
>>> _TensorDataLazyEvaluator which can be an example for me to implement these
>>> functionalities. It has methods like delete item, inverse matrix, etc.
>>>
>>>
>>>
>>> Ø  code generation for arrays and array operators
>>>
>>> This part of project should be involved with another GSoC project purely
>>> for code generation. I would like to discuss with the mentor of the codegen
>>> project to have a better point of view for it.
>>>
>>> I have had an internship for 6 months in BNP Paribas Securities Services
>>> in Paris as developer. During this period, I have similarly worked on code
>>> generation task, except that the programming language is C#.( I was using
>>> EntityFramework and T4 by Microsoft) I believe that this experience can
>>> help me to get familiar with the code generation process in this project.
>>>

Re: [sympy] GSoC 2019 Project: Group Theory

2019-03-28 Thread Jason Moore
Anway,

You sound like a good fit for GSoC, start here:
https://github.com/sympy/sympy/wiki/GSoC-2019-Student-Instructions

And yes, we do have a number of expected to fail tests.

Jason
moorepants.info
+01 530-601-9791


On Mon, Mar 25, 2019 at 11:19 AM Anway De  wrote:

> Hi!
>
> My name is Anway De. I am sophomore at St. Olaf College, Northfield,
> Minnesota, majoring in Computer Science and Mathematics. I am really
> interested to work on the Group Theory project for SymPy.
>
> I have 3+ years of programming experience in Python. Virtual ALU circuit,
> Banking Application, Sudoku solver are among the projects that I have
> implemented using Python. Having taken Abstract Algebra I last semester and
> taking Abstract Algebra II this semester, I have a lot of experience with
> Group Theory and am familiar with the terms and concepts mentioned in the
> project description. Being a computer science major, I have thought about
> working with groups in code and being able to work with SymPy on this
> project would be a great experience for me. I have used SymPy before as
> well as quite a bit of Mathematica and am familiar with the concept of
> symbolic math. I have also set up and used Jupyter Notebooks and know about
> using Cython. Right now, I am working on a research project with kubernetes
> and containers, hence I am able to analyze problems and research about them
> to come up with solutions.
>
> The reports on the previous work done on the project were very informative
> and helpful. I also took a look at the combinatorics module of SymPy and
> played around with the group functions. I have setup my SymPy environment
> with anaconda and github. I took a look at the (first-time) issues but am
> yet to make any pull requests. I hope to get that done soon. However, I
> have one question regarding this: When I run bin/test (on the original
> repository code) it outputs [OK] for all the tests but prints out the
> following message at the end: "tests finished: 7946 passed, 326 skipped,
> 359 expected to fail, 3 expected to fail but passed, in 2763.87 seconds" -
> my concern here is that it says 359 expected to fail. Is that still okay?
>
> Let me know if my qualifications sound suitable for this project. Also let
> me know if you need any other information from me. I am looking forward to
> hearing back from you.
>
> Thank You
> Anway
>
> --
> 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/30354494-6b0f-47de-b79e-66e1bc060ef7%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/CAP7f1Aj1i%2BZvuwz%2BmrXBdMxcizD9JN9-HU_iakEjrYBqruDKyQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Proposal for Linear Algebra: Tensor core (Looking for the mentor)

2019-03-28 Thread zhiqikang
Hello Jason,

Thank you! It seems that you are quite busy now greeting to the newbies. :-)
I am waiting for someone to review my proposal. Could you please tell me to 
whom I should reach out? 

Regards,
Zhiqi

在 2019年3月28日星期四 UTC+1下午5:14:46,Jason Moore写道:
>
> Zhiqi,
>
> This looks well thought out a first glance. Check out 
> https://github.com/sympy/sympy/wiki/GSoC-2019-Student-Instructions if you 
> haven't yet.
>
> Jason
> moorepants.info
> +01 530-601-9791
>
>>
>> -- 
>> 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/a5ff49d3-63e4-45e5-b87f-4b9d6be30085%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/a3fe610c-c874-43b5-bcb8-bbbf77d6de43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Gsoc19 initial Proposal: Bond Graphs

2019-03-28 Thread Arooshi Verma
Thanks a lot!  I have already started writing the proposal. And yeah,  I
will check out the network API.

Thanks again.
Arooshi

On Thu, 28 Mar 2019, 21:54 Jason Moore,  wrote:

> Arooshi,
>
> Start here if you haven't yet:
> https://github.com/sympy/sympy/wiki/GSoC-2019-Student-Instructions
>
> As far as Bond graphs I recommend checking out the networkx API and the
> steps to create bond graphs. Then write a proposal that explains what a
> user will type and what the output will be as a first start.
>
> Jason
> moorepants.info
> +01 530-601-9791
>
>
> On Fri, Mar 22, 2019 at 8:04 PM Arooshi Verma 
> wrote:
>
>> Hello,
>> I am Arooshi Verma from IIT Bhubaneswar,India. I have already started
>> contributing to Sympy. I have been among the top in my engineering
>> mechanics class. Moreover, I have qualified a lot of Physics and
>> Mathematics Olympiads.
>>
>> After going through the Gsoc ideas page, I got particularly interested in
>> the project System Dynamics: Bond Graph Tools. I know how to work on
>> Bond Graphs for many systems (mechanical,electrical etc.). I researched
>> more about how to implement it using python and would like to start by
>> doing the following:
>>
>> *New package: *This will consist the classes-
>>   1)node (attributes- name,
>> value(eg. mass))
>>   2)edge (attributes-
>> from(node), to(node), e(generalized flow), f(generalized effort) )
>>   3)constant_junction
>> (attributes- value(0/1)
>> *Getting the initial equations of motion:* We can generate the equations
>> of motion using the properties of of 1 and 0 junctions. We'll write all the
>> e/f values in terms of other e/f and/or node values
>>
>> *Solving the linear equations:* We can solve the linear equations using
>> the solveset. We'll use solveset moving from the leaf nodes to the internal
>> nodes so as to get the equations in the form of node values and
>> differentials.
>>
>> I have gone through the different sympy modules.
>> Since there's no ealier work on this, I would like some suggestions on
>> how to proceed. I will submit the refined proposal based on the
>> suggestions. I would love to know what the mentors think about the same.
>>
>> Thank you.
>> Arooshi Verma
>>
>> --
>> 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/CAG48h5S0ZVvC9sSC8vNVU8aHONXFxSm7qpqXRwznufrf4H_Dfg%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/CAP7f1AiHYVvNhh%2BLqGXZRSs0k_FF4hcYsFTqqeYHH%3DK-8qpnvQ%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/CAG48h5RcfFFYwrfK_jBOtQX1f8kGShkUYK%2BybSmBgoohJBRkig%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] status of risch algorithm for symbolic integration

2019-03-28 Thread Jason Moore
Aliva,

There is plenty to do there. Search the issues, mailing list, and wiki for
"risch" and read as much as you can.

Start here for GSoC:
https://github.com/sympy/sympy/wiki/GSoC-2019-Student-Instructions

Jason
moorepants.info
+01 530-601-9791


On Fri, Mar 22, 2019 at 9:38 AM Aliva Basa  wrote:

> Hello Aaron Meurer
>
> Could you please let me know the status of the 'risch algorithm for
> symbolic integration' project and please guide me where to start.
>
>
> Thanks
> Aliva
>
> --
> 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/6c9b5bb4-1bb2-49f2-8f0c-3bcaecc01ee0%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/CAP7f1AgQPxHYv_T%2BcMOVOyiyPOy14xorRGfca8w6csO%3D8Bz8sA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Proposal for Linear Algebra: Tensor core (Looking for the mentor)

2019-03-28 Thread zhiqikang
Hello Jason,

Thank you! It seems that you are quite busy now greeting to the newbies. :-)
I am waiting for someone to review my proposal. Could you please tell me to 
whom I should reach out? 

Regards,
Zhiqi

在 2019年3月28日星期四 UTC+1下午5:14:46,Jason Moore写道:
>
> Zhiqi,
>
> This looks well thought out a first glance. Check out 
> https://github.com/sympy/sympy/wiki/GSoC-2019-Student-Instructions if you 
> haven't yet.
>
> Jason
> moorepants.info
> +01 530-601-9791
>
>
> On Wed, Mar 27, 2019 at 12:13 AM > wrote:
>
>> Hello,
>>
>>
>> My name is Zhiqi KANG, I am a 4th year undergraduate of a 5-year 
>> engineering institution: Université de Technologie de Compiègne, France. I 
>> am interested in the project Linear algebra: Tensor core.Here is the link 
>> for the description of project idea. 
>> https://github.com/sympy/sympy/wiki/GSoC-2019-Ideas#linear-algebra-tensor-core
>>  Even 
>> though I am not very familiar with the tensor in the physical field, its 
>> principal in the mathematical field is quite interesting. I have 
>> precisely looked at the requirement of this project and make sure that I am 
>> capable to accomplish most of its task. However, there are still many 
>> questions that I would like to discuss with all contributors of SymPy and 
>> expecially with the mentor. One urgent problem is that I don't find the 
>> name of mentor for this project, so I don't really know who I should CC. 
>> Could you please help me to find the mentor for this project?  
>>
>>
>> Please review this draft proposal and tell me what to be ameliorated. 
>> Thank you!
>>
>>
>>
>> Ø  Better Algorithms for sparse array:
>>
>> The idea is to manipulate directly les arrays in the sparse array level. 
>> Casting sparse arrays to a dense array and then operating is kind of a 
>> redundancy. I have found an example in tomatrix() function of 
>> sympy\sympy\tensor\array\sparse_ndim_array.py where we convert the 
>> sparse_array to a new dictionay and then cast it to matrix.(Code bellow)
>>
>> But I cannot find more cases in the array/tensor module, it would be 
>> great if some one can help me find out where other cases are.
>>
>>
>> from sympy.matrices import SparseMatrix
>>
>> if self.rank() != 2: 
>>
>>   raise ValueError('Dimensions must be of size of 2')
>>
>> mat_sparse = {}
>>
>> for key, value in self._sparse_array.items(): 
>>
>>   mat_sparse[self._get_tuple_index(key)] = value
>>
>> return SparseMatrix(self.shape[0], self.shape[1], mat_sparse) 
>>
>>  
>>
>> Ø  NumPy-like operations
>>
>> We have now some operations for arrays in SymPy:
>>
>> ²  arrayfy
>>
>> ²  tensor product
>>
>> ²  derivatives by array
>>
>> ²  permute dimension
>>
>> ²  contraction
>>
>> For this part of project, I am planning to implement some operations such 
>> as:
>>
>> ²  sum
>>
>> ²  divide/multiply(element wise)
>>
>> ²  any
>>
>> ²  comparators(greater/less/equal)
>>
>> ²  logical operator(and/or/not/xor)
>>
>> ²  random
>>
>> 
>>
>> Ø  lazy operators on arrays
>>
>> lazy evaluation can improve the performance while iterating the array 
>> since it creates value only if it is called. To implement lazy operators, I 
>> am thinking about two plans:
>>
>> 1.  Create a new sub-module named lazy-array (larray) of which most 
>> of the operations are lazy evaluated. A standard Array can be cast to a 
>> lazy-array by simply calling the constructor of larray and passing it as 
>> parameter. By doing so, users can choose whatever they want in the module 
>> level, which means that to manipulate a simple array or a lazy array.
>>
>>  
>>
>> 1.  Create a lazy version for les operators mentioned above. The 
>> lazy operators are accessible for a specific purpose. This implementation 
>> focusses on a function level for calling lazy evaluated operations, which 
>> means to call a simple inverse_matrix function or a lazy one.
>>
>>  
>>
>> Besides, I have found in sympy\sympy\tensor\tensor.py a class 
>> _TensorDataLazyEvaluator which can be an example for me to implement these 
>> functionalities. It has methods like delete item, inverse matrix, etc.
>>
>>  
>>
>> Ø  code generation for arrays and array operators 
>>
>> This part of project should be involved with another GSoC project purely 
>> for code generation. I would like to discuss with the mentor of the codegen 
>> project to have a better point of view for it. 
>>
>> I have had an internship for 6 months in BNP Paribas Securities Services 
>> in Paris as developer. During this period, I have similarly worked on code 
>> generation task, except that the programming language is C#.( I was using 
>> EntityFramework and T4 by Microsoft) I believe that this experience can 
>> help me to get familiar with the code generation process in this project.
>>
>>  
>>
>> Ø  Integration over indexed symbols and arrays
>>
>> Firstly, I would like to talk about integration over arrays:
>>
>> Can we imagine the array as a set of coordinates? Suppose that we have a 
>> array A, say 

Re: [sympy] Need help in finalizing gsoc summer project

2019-03-28 Thread Jason Moore
Abhinav,

Most of your ideas are very simple mathematics to implement with the
current Beam class, so you'll probably need to come up with something more
substantial for GSoC. I recommend starting a proposal with the detailed
ideas so we can get a better picture.

If you haven't, start here:
https://github.com/sympy/sympy/wiki/GSoC-2019-Student-Instructions

Jason
moorepants.info
+01 530-601-9791


On Sun, Mar 24, 2019 at 3:22 AM  wrote:

> I am a junior year mechanical engineering student in VIT Vellore. I am
> interested in working on the continuum mechanics of the beam during summer
> as part of gsoc 2019. Till now I have following points to work on-
> - Function for calculating torsional stresses. For this I am planning to
> compute angle of twist with the help of modulus of rigidity of beam
> material. And from that figure out the torsional shear stress induced at
> the outer surface of beam.
> - Function for calculating bending stresses( both tensile and compressive).
> - Function for calculating buckling similar to columns. For this I am
> planning to compute Euler's critical load, slenderness ratio and with the
> help of those two I will be calculating the stress that causes buckling in
> the beam. Also I am thinking about adding self bucking but I am not quite
> sure about it.
> - Taking factor of safety into account and compute maximum permissible
> design stress( both tensile and compressive) as well as maximum permissible
> shear stress.
> - Add similar implementations for overhanging and double overhanging beams.
>
> Can someone review these ideas or add additional points to these for me to
> work during summer.
>
> --
> 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/934d8ce1-9711-4c80-856a-72b8003b0b70%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/CAP7f1AgPBuacA7joTr%2B2tgEJin2Y6cJQSBV1peYJLu69%2BFz3Xw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Introduction to Community!

2019-03-28 Thread Jason Moore
Orestis,

Welcome to SymPy, start here:
https://github.com/sympy/sympy/wiki/GSoC-2019-Student-Instructions

Jason
moorepants.info
+01 530-601-9791


On Mon, Mar 25, 2019 at 12:16 PM Orestis Vaggelis 
wrote:

> Hello guys,
>
> my name is Orestis Vaggelis and I currently am on my junior year (2nd
> semester) on National and Kapodistrian University of Athens, majoring in
> mathematics. I am really interested on working on the Series Expansions
> Project, since it gives me the opportunity to combine math and programming.
> As for the series expansions part, I have taken courses on Calculus I and
> II and I am familiar with all the concepts necessary for this project.
> Regarding programming, I have been using matlab and python, for over a
> year now.
> I haven't really done much to contribute on Sympy yet, but I've just
> started and I am planning to do so, as much as possible!
>
> For any more information, please don't hesitate to contact me!
>
> --
> 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/6e666891-3323-4035-afcf-dbeb9b4d7de8%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/CAP7f1Agu6kvP8hDHzhePfKR-uWcxPy2Ayqb03QDAG24reaysag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Wave Trains in SymPy

2019-03-28 Thread Jason Moore
Abhigyan,

This isn't implemented as far as I know. Feel free to send ideas about the
details. I recommend staring by typing up what you hope a user could type
and what outputs to expect.

Jason
moorepants.info
+01 530-601-9791


On Tue, Mar 26, 2019 at 1:27 AM Abhigyan Dutta 
wrote:

> Hi everyone,
>
> I am an electrical engineer with 3 year programming experience in Python.
> Recently I wanted to model some
> electrical components using SymPy.But I had to drop it due to the absence
> of any function which simulates Wave trains.
> The Piecewise function in my opinion is too tedious to make user defined
> wave trains.
>
> So I want to create a function to easily create Wave trains. Will this be
> useful? Is it already implemented or can be
> done by combining other functions? What would be your advice on writing
> such a module?
>
> Thanks in advance!
>
> --
> 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/c98b8a4b-058a-46f4-87d2-6afce9c271fd%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/CAP7f1AgNhYwwpX-BP36FO5QQV54c7r3hyHPox1V3erA0b%3D__0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Re: GSoC'19 : Continuum mechanics Idea proposal

2019-03-28 Thread Jason Moore
Ishan,

Comments:


   -

   Integrating the geometry module with beam module


Yes, we need good support of arbitrary cross sections that utilize 2D
shapes from the geometry module.


   -

   Additional features in the beam module:
   -

  Apply torsional load in 2d beams its corresponding calculations
  -

  Apply Axial load in 2d beams and its corresponding calculations



   -

  Combined loading(bending and torsion)

I think this is what Beam3D does. Not needed in 2D.

   -

  Stress calculations in  2d as well as in 3d
  -

  Dynamic loading in beams.

Not sure about this. You'd need to flesh this out more. There isn't much
use in complex symbolics for this.

   -

   Implementing Column Buckling and its calculations.

Sure, please come up with more details about how this would look.

   -

   `Draw` function: A function to draw the diagram of the beam with its
   loads using matplotlib. Kind of like :

Yes, this would be very nice.



   -

   Truss structure implementation and its calculations. It won’t be a part
   of the beam module but can be taken under continuum_mechanics.


Provide more details.


See: https://github.com/sympy/sympy/wiki/GSoC-2019-Student-Instructions if
you haven't.

Jason

moorepants.info
+01 530-601-9791


On Tue, Mar 26, 2019 at 7:08 AM Jashan  wrote:

> Hey Ishan
>
> Yathartha is right, these can be good additions to the
> continuum_mechanics. I would prefer you to use the module to solve more
> beam problems and see if there are any particular type of problems that it
> cannot solve.
>
> If the examples you solve is quite different from the one covered in docs
> 
>  here,
> you can also create a PR to add some of yours.
>
> Thanks
> Jashanpreet Singh
>
> --
> 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/fbbe3811-13bd-42b0-b1a8-a751d2f9ca10%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/CAP7f1Ag1SbHzg_GLHqOKq85nK1obxumAJDK1Fg6N0H0OOHTipw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Proposal for Linear Algebra: Tensor core (Looking for the mentor)

2019-03-28 Thread Jason Moore
Zhiqi,

This looks well thought out a first glance. Check out
https://github.com/sympy/sympy/wiki/GSoC-2019-Student-Instructions if you
haven't yet.

Jason
moorepants.info
+01 530-601-9791


On Wed, Mar 27, 2019 at 12:13 AM  wrote:

> Hello,
>
>
> My name is Zhiqi KANG, I am a 4th year undergraduate of a 5-year
> engineering institution: Université de Technologie de Compiègne, France. I
> am interested in the project Linear algebra: Tensor core.Here is the link
> for the description of project idea.
> https://github.com/sympy/sympy/wiki/GSoC-2019-Ideas#linear-algebra-tensor-core
>  Even
> though I am not very familiar with the tensor in the physical field, its
> principal in the mathematical field is quite interesting. I have
> precisely looked at the requirement of this project and make sure that I am
> capable to accomplish most of its task. However, there are still many
> questions that I would like to discuss with all contributors of SymPy and
> expecially with the mentor. One urgent problem is that I don't find the
> name of mentor for this project, so I don't really know who I should CC.
> Could you please help me to find the mentor for this project?
>
>
> Please review this draft proposal and tell me what to be ameliorated.
> Thank you!
>
>
>
> Ø  Better Algorithms for sparse array:
>
> The idea is to manipulate directly les arrays in the sparse array level.
> Casting sparse arrays to a dense array and then operating is kind of a
> redundancy. I have found an example in tomatrix() function of
> sympy\sympy\tensor\array\sparse_ndim_array.py where we convert the
> sparse_array to a new dictionay and then cast it to matrix.(Code bellow)
>
> But I cannot find more cases in the array/tensor module, it would be great
> if some one can help me find out where other cases are.
>
>
> from sympy.matrices import SparseMatrix
>
> if self.rank() != 2:
>
>   raise ValueError('Dimensions must be of size of 2')
>
> mat_sparse = {}
>
> for key, value in self._sparse_array.items():
>
>   mat_sparse[self._get_tuple_index(key)] = value
>
> return SparseMatrix(self.shape[0], self.shape[1], mat_sparse)
>
>
>
> Ø  NumPy-like operations
>
> We have now some operations for arrays in SymPy:
>
> ²  arrayfy
>
> ²  tensor product
>
> ²  derivatives by array
>
> ²  permute dimension
>
> ²  contraction
>
> For this part of project, I am planning to implement some operations such
> as:
>
> ²  sum
>
> ²  divide/multiply(element wise)
>
> ²  any
>
> ²  comparators(greater/less/equal)
>
> ²  logical operator(and/or/not/xor)
>
> ²  random
>
>
>
> Ø  lazy operators on arrays
>
> lazy evaluation can improve the performance while iterating the array
> since it creates value only if it is called. To implement lazy operators, I
> am thinking about two plans:
>
> 1.  Create a new sub-module named lazy-array (larray) of which most
> of the operations are lazy evaluated. A standard Array can be cast to a
> lazy-array by simply calling the constructor of larray and passing it as
> parameter. By doing so, users can choose whatever they want in the module
> level, which means that to manipulate a simple array or a lazy array.
>
>
>
> 1.  Create a lazy version for les operators mentioned above. The lazy
> operators are accessible for a specific purpose. This implementation
> focusses on a function level for calling lazy evaluated operations, which
> means to call a simple inverse_matrix function or a lazy one.
>
>
>
> Besides, I have found in sympy\sympy\tensor\tensor.py a class
> _TensorDataLazyEvaluator which can be an example for me to implement these
> functionalities. It has methods like delete item, inverse matrix, etc.
>
>
>
> Ø  code generation for arrays and array operators
>
> This part of project should be involved with another GSoC project purely
> for code generation. I would like to discuss with the mentor of the codegen
> project to have a better point of view for it.
>
> I have had an internship for 6 months in BNP Paribas Securities Services
> in Paris as developer. During this period, I have similarly worked on code
> generation task, except that the programming language is C#.( I was using
> EntityFramework and T4 by Microsoft) I believe that this experience can
> help me to get familiar with the code generation process in this project.
>
>
>
> Ø  Integration over indexed symbols and arrays
>
> Firstly, I would like to talk about integration over arrays:
>
> Can we imagine the array as a set of coordinates? Suppose that we have a
> array A, say 2-dimension as (p, q). We can image two axis x and y so that
> index i and j are coordinates for the point Pij in axis x and axis y. The
> value A[pi,qj] should be the coordinate of axis z. By assuming this, we can
> use a Riemann integral or Lebesgue integral to calculate its integration
> like summing the column in the 3D space.
>
> I don’t know if this idea is correct, I would love to discuss it with you!
>
>
>
> Secondly, for integration over indexed symbols, I don’t really 

Re: [sympy] Re: GSoC-19 Proposal : Series and Expansion

2019-03-28 Thread Jason Moore
Nabanita,

Welcome to SymPy, thanks for the PRs. If you haven't seen
https://github.com/sympy/sympy_benchmarks, be sure to read through the info
there.

Jason
moorepants.info
+01 530-601-9791


On Wed, Mar 27, 2019 at 5:29 AM Nabanita Dash 
wrote:

> I have 2 merged prs
> https://github.com/sympy/sympy/pull/16402
> https://github.com/sympy/sympy/pull/16198
> 
>
> I am working on some other issues though not completely related to my
> project
>
> On Wednesday, March 27, 2019 at 5:37:47 PM UTC+5:30, Nabanita Dash wrote:
>>
>>  Hi,
>> This is a GSoC-19 aspirant.I am a 2nd year CS Undergrad from
>> IIIT,BBSR,India. I want to work on the project idea of Series-Expansion.I
>> had discussed with Sartaj Singh as said by Aaron Meurer to geta hold on the
>> idea.My proposed ideas are as below:
>> !)Improve rs_series module
>> I plan to add fourier,taylor,maclaurian,dirichlet,stirling series and
>> other hyperbolic series in rs_series to make it efficient to use.
>> 2)Improve Formal Power Series
>> a)The limits applied to check fps and calculate logarithmic singularity
>> needs improvement as it creates XFAIL tests.I want to create an API that
>> accepts the singularities points and revise it to give positive results.
>> >>>f = asech(x)
>> >>>fps(f, x)
>> log(2) - log(x) - x**2/4 - 3*x**4/64 + O(x**6)
>>  A logarithmic singularity is a singularity of an analytic function whose
>> main z-dependent term is of order O(lnz). An example is the singularity of
>> the Bessel function of the second kind
>> Y_0(z)∼(2gamma)/pi+2/piln(1/2z)+... at z=0
>> ,Green function and some trignometric functions.
>>
>> Singularities with leading term consisting of nested logarithms, e.g.,
>> lnlnlnz, are also considered logarithmic.
>> 3) Improve limits
>> I think of adding special functions for calculating limits at oo.
>> https://github.com/sympy/sympy/issues/14590 according to no special
>> functions have been used in limits code.
>>
>> def test_exponential2():
>> n = Symbol('n')
>> assert limit((1 + x/(n + sin(n)))**n, n, oo) == exp(x)
>> Also,I plan to calculate limits at multivariate points.In SymP,
>> limit(a,z,z0,dir='+') is possible to calculate limits for a single variable
>> z,I want to calculate limit(f(x,y),x,y,x0,y0,dir='+')
>>
>>
>> I need suggestions to work on these ideas as well as any changes to be
>> made to these or propose any other idea is welcome.
>>
>> --
> 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/756926d5-f831-4a6c-864e-465e58528222%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/CAP7f1Ah7C%3D3aOw7XUUJ5S_ovmMnSv4z8duLX%2BQXc%3Dx3h8XZHbw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Gsoc Project idea " Efficient Equation ofMotionGenerationwith Python" discussion.

2019-03-28 Thread Jason Moore
We have a benchmark repository that is run periodically:
https://github.com/sympy/sympy_benchmarks

I recommend starting there. You can find a number of regressions that can
be investigated.

Jason
moorepants.info
+01 530-601-9791


On Wed, Mar 27, 2019 at 5:17 PM Aaron Meurer  wrote:

> I agree with Oscar. I would also add that it's usually not trivial to
> determine where the bottlenecks are in SymPy. So I would write more
> about how you intend to profile the code.
>
> Perhaps it would be useful to take an existing thing that is slow in
> SymPy (you can use the performance issue label as a guide, or find
> something yourself,
>
> https://github.com/sympy/sympy/issues?q=is%3Aopen+is%3Aissue+label%3APerformance
> ),
> and try to fix the performance, documenting how you went about finding
> the bottleneck and fixing it. This can be used as a case study in your
> application.
>
> Also I would note that currently the benchmarking infrastructure for
> SymPy is quite bad (basically nonexistent). See
>
> https://github.com/sympy/sympy/wiki/GSoC-2019-Ideas#benchmarks-and-performance
> .
> It's fine if you do not want to work on that specifically, but you
> should note that you will be running the benchmarks on your own
> computer to find performance regressions. Not all performance issues
> are regressions either (some things have always been slow), so you
> should consider absolute numbers as well as relative numbers.
>
> Aaron Meurer
>
> On Wed, Mar 27, 2019 at 5:11 PM Oscar Benjamin
>  wrote:
> >
> > This looks like good work to do. I don't know how these applications
> > are evaluated but my thought if I was reviewing this would be that it
> > seems quite vague. This would probably be a more enticing proposal if
> > it had some specific suggestions of changes that would speed things
> > up.
> >
> > I can tell you now what is slow in the ODE module: currently even for
> > the simplest ODEs all matching code is run for all the possible
> > methods even after a suitable method has been found. It would be much
> > better to identify the most immediately usable solver and then use
> > that without matching all the others. This needs a refactor of the
> > module though and a redesign of the basic approach used by dsolve. I
> > want that to happen as an ultimate goal but I would like to see better
> > test coverage first.
> >
> > On Wed, 27 Mar 2019 at 09:56, Shiksha Rawat 
> wrote:
> > >
> > >
> https://github.com/sympy/sympy/wiki/GSoC-2019-Application-SHIKSHA-RAWAT-:-Benchmarks-and-performance
> > >
> > > I have designed a proposal for Benchmarks and Perfromance idea, though
> it is not complete yet.
> > >
> > > Can Jason Moore, Aaron and Oscar please review that and suggest
> changes?
> > >
> > >
> > > On Tue, Mar 19, 2019 at 11:53 PM Shiksha Rawat <
> shiksharawa...@gmail.com> wrote:
> > >>
> > >> I did further digging on the idea mentioned by Jason Moore.
> > >>
> > >> Figuring out the main bottlenecks for sympy : The best way to figure
> out these bottlenecks would be to designing a typical problem for each
> module for example mass spring damper for physics and computing time taken
> by sympy to give the output.If it is greater then expected than or a
> predefined threshold than analyzing the codebase of that module for
> possible changes to decrease computation time. And the results of
> predefined benchmarks could also be used.
> > >>
> > >> Creating benchmarks :
> https://media.readthedocs.org/pdf/asv/v0.1.1/asv.pdf
> > >> I think this documentation could come in handy for creating the
> benchmarks. The requirement of a particular benchmark could be made on the
> basis of the bottlenecks which we will figure out.
> > >>
> > >> Improving performance:  I think the best way to improve performance
> would be cleaning up the codebase first and then making changes in the
> algorithms used according to the requirements.
> > >>
> > >> Future Scope: Figuring out a method by which each PR also has to give
> information about the time the modules related to that PR will take to give
> output of problems associated with that module. (those mentioned in
> figuring out the bottlenecks point).
> > >>
> > >> I might be wrong about the ideas mentioned above. So I want
> suggestions from the mentors.
> > >>
> > >> Thanks.
> > >>
> > >> On Fri, Mar 15, 2019 at 9:48 PM Shiksha Rawat <
> shiksharawa...@gmail.com> wrote:
> > >>>
> > >>> I am really interested in taking up that idea. Can you suggest where
> or how should I start from because up till now I was just focusing on the
> physics module and benchmarks related to it?
> > >>> I am still trying to find how could we optimize matrix operations.
> > >>>
> > >>>
> > >>> On Fri, Mar 15, 2019 at 8:46 PM Jason Moore 
> wrote:
> > 
> >  The mechanics speedup idea is really just a narrow version of the
> profiling and benchmarking idea (focuses on just a couple of packages).
> Maybe a proposal that focuses on figuring out the main bottlenecks for
> sympy, creating 

Re: [sympy] [GSoC] Introduction & Interest in "Group Theory" Project

2019-03-28 Thread Jason Moore
Mian,

Welcome, see
https://github.com/sympy/sympy/wiki/introduction-to-contributing to get
started.

Jason
moorepants.info
+01 530-601-9791


On Thu, Mar 28, 2019 at 2:30 AM Mian  wrote:

> Hi there,
>
> I'm Mian, a senior Applied Math undergraduate from UC Berkeley. I am
> taking abstract algebra and really interested in it, so I hope to apply for
> the project about "Group Theory".
>
> I have 2 years python programming experience, and also know Java, R and
> basic Matlab. I involved in applied machine learning projects related to
> healthcare(mammography classification, medical text classification),
> multi-media (cross-modal retrieval) and business analytics. Thus I am
> familiar with numpy, scipy, sklearn and some basic usage of
> PyTorch/Tensorflow. I also heavily use Jupyter notebook. I am happy and
> open to talk about them if anyone share similar interests in applied ML.
>
> I got interested in learning and contributing more about mathematics
> softwares from using Sage and Matlab in my cryptography and numerical
> analysis class. They both served as powerful tools to support my math
> study! Thus I want to be part of the community, specifically to help in
> "Group Theory" project as I am very fascinated by my abstract course
> materials.
>
> By the summer, I will have taken linear and abstract, real and complex
> analysis as well as numerical analysis courses from Berkeley upper-division
> math curriculum. I also took cryptography. I will attach the textbooks we
> used at bottom.
>
> My summer would be either in U.S or Asia.
>
> Books we used:
> - A First Course in Abstract Algebra, 7th Edition, by John B. Fraleigh
> - Elementary Analysis, by Kenneth A. Ross
> - Complex variables and applications, by James Brown and Ruel Churchill
> - Numerical Analysis, by R. L. Burden and J. D. Faires,
> - Linear Algebra, by Stephen H. Friedberg, Arnold J. Insel, Lawrence E.
> Spence
>
> --
> 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/ea7db0f4-a5cc-4434-a96b-9dacd45757e4%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/CAP7f1Ag8w-VB0jy7_HmcsbJEpQ6Rz%2B4-ZewH7rErs231LYd4nA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Re: Gsoc'19 Bond graph Tools idea

2019-03-28 Thread Jason Moore
Arooshi,

The bond graph module would need to be created first, which will likely be
an entire summer project. As for a gui, tkinter could be used, but most
scipy related projects are utilizing web based gui toolkits.

Jason
moorepants.info
+01 530-601-9791


On Wed, Mar 27, 2019 at 8:54 PM Arooshi Verma 
wrote:

> Hi !
> I was going through various ways I can provide a GUI for the upcoming Bond
> Graph Tools project and came across Tkinter- (
> https://docs.python.org/2/library/tkinter.html),(
> https://docs.python.org/2/library/tkinter.html).
>
> Wondering if this can be used? We can make something like a grid with each
> cell as a node/junction(1/0) and an option to connect various junction.
>
> Would love feedback from all regarding the same.
> Thanks !
>
>

-- 
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/CAP7f1AjEU3H7gdmjzzVEUhifSH7CBp%2B-5HVeS4Dsny8ywpAGjA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Gsoc Project :- "System Dynamics: Bond Graph Tools" discussion

2019-03-28 Thread Arooshi Verma
Hi !
I was going through various ways I can provide a GUI for the upcoming Bond 
Graph Tools project and came across Tkinter- (
https://docs.python.org/2/library/tkinter.html),( 
https://docs.python.org/2/library/tkinter.html).

Wondering if this can be used? We can make something like a grid with each 
cell as a node/junction(1/0) and an option to connect various junction.

Would love feedback from all regarding the same. 
Thanks 

-- 
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/177088ff-9740-4063-9d50-ff62bba7a44f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] [GSoC] Introduction & Interest in "Group Theory" Project

2019-03-28 Thread Mian
Hi there,

I'm Mian, a senior Applied Math undergraduate from UC Berkeley. I am taking 
abstract algebra and really interested in it, so I hope to apply for the 
project about "Group Theory". 

I have 2 years python programming experience, and also know Java, R and 
basic Matlab. I involved in applied machine learning projects related to 
healthcare(mammography classification, medical text classification), 
multi-media (cross-modal retrieval) and business analytics. Thus I am 
familiar with numpy, scipy, sklearn and some basic usage of 
PyTorch/Tensorflow. I also heavily use Jupyter notebook. I am happy and 
open to talk about them if anyone share similar interests in applied ML.

I got interested in learning and contributing more about mathematics 
softwares from using Sage and Matlab in my cryptography and numerical 
analysis class. They both served as powerful tools to support my math 
study! Thus I want to be part of the community, specifically to help in 
"Group Theory" project as I am very fascinated by my abstract course 
materials. 

By the summer, I will have taken linear and abstract, real and complex 
analysis as well as numerical analysis courses from Berkeley upper-division 
math curriculum. I also took cryptography. I will attach the textbooks we 
used at bottom.

My summer would be either in U.S or Asia.

Books we used:
- A First Course in Abstract Algebra, 7th Edition, by John B. Fraleigh
- Elementary Analysis, by Kenneth A. Ross
- Complex variables and applications, by James Brown and Ruel Churchill
- Numerical Analysis, by R. L. Burden and J. D. Faires,
- Linear Algebra, by Stephen H. Friedberg, Arnold J. Insel, Lawrence E. 
Spence

-- 
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/ea7db0f4-a5cc-4434-a96b-9dacd45757e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Commutative & Idempotent Function Interfaces

2019-03-28 Thread 'Felix Neutatz' via sympy
Amazing, thank you for the fast answer :)

On Thursday, March 28, 2019 at 12:49:46 AM UTC+1, Aaron Meurer wrote:
>
> The is_commutative assumption applies specifically to objects in a Mul 
> (so if an object has is_commutative=False, then Mul will not reorder 
> it with other noncommutative objects). 
>
> To do what you want, you should define the eval method so that it 
> sorts the args. A common way to get a canonical args ordering is to 
> use ordered(). 
>
> >>> class CommutativeFunction(Function): 
> ... @classmethod 
> ... def eval(cls, a, b): 
> ... if list(ordered([a, b])) == [b, a]: 
> ... return cls(b, a) 
> >>> CommutativeFunction(x, y) 
> CommutativeFunction(x, y) 
> >>> CommutativeFunction(y, x) 
> CommutativeFunction(x, y) 
>
> Idempotent is even easier. In eval(), if the argument is an Idempotent 
> function, return it. 
>
> >>> class IdempotentFunction(Function): 
> ... @classmethod 
> ... def eval(self, x): 
> ... if isinstance(x, IdempotentFunction): 
> ... return x 
> >>> IdempotentFunction(x) 
> IdempotentFunction(x) 
> >>> IdempotentFunction(IdempotentFunction(x)) 
> IdempotentFunction(x) 
>
> Note that setting nargs is unnecessary when defining eval, as it gets 
> it from the eval signature automatically. 
>
> Aaron Meurer 
>
> On Wed, Mar 27, 2019 at 5:39 PM 'Felix Neutatz' via sympy 
> > wrote: 
> > 
> > Hello everybody, 
> > 
> > first of all, thank you so much for sympy! 
> > 
> > Currently, I am mostly using the simplification tools of sympy. One 
> thing that I would like to do is to define a Function by providing 
> properties, such as the commutative property or idempotence, but without 
> actually implementing the body of the Function. To explain this a bit 
> better, I provide an example: 
> > 
> > import sympy 
> > 
> > print(sympy.Add(sympy.Symbol('y'), sympy.Symbol('x'))) 
> > print(sympy.Add(sympy.Symbol('x'), sympy.Symbol('y'))) 
> > 
> > 
> > class CommutativeFunction(sympy.Function): 
> > nargs = 2 
> > is_commutative = True 
> > 
> > @classmethod 
> > def eval(cls, a, b): 
> > return None 
> > 
> > print(CommutativeFunction(sympy.Symbol('x'), sympy.Symbol('y'))) 
> > print(CommutativeFunction(sympy.Symbol('y'), sympy.Symbol('x')) 
> > 
> > 
> > This would result in the following output: 
> > x + y 
> > x + y 
> > True 
> > CommutativeFunction(x, y) 
> > CommutativeFunction(y, x) 
> > 
> > For the commutative Add Function sympy automatically detects that the 
> order of attributes is not important and therefore reorders attributes 
> alphabetically. 
> > However, for my custom function, this does not work. Is there any trick 
> to do that? 
> > 
> > The second question is about defining an idempotent Function: 
> > class IdempotentFunction(sympy.Function): 
> > nargs = 1 
> > is_idempotent = True 
> > 
> > @classmethod 
> > def eval(cls, a): 
> > return None 
> > 
> > print(IdempotentFunction(IdempotentFunction(sympy.Symbol('x' 
> > >> IdempotentFunction(x) 
> > Of course, this does not work yet because there is no logic that handles 
> the variable "is_idempotent". Is there any easy way to implement this 
> functionality? 
> > 
> > Thank you again! 
> > 
> > Best regards, 
> > Felix 
> > 
> > 
> > 
> > 
> > 
> > 
> > -- 
> > 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/af447b89-3521-4901-bc4a-40e6fb1261b7%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/16f6b6c1-5414-448c-af52-90c46e9c757b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.