[sympy] trunc () result

2017-01-11 Thread swapnil sharma


trunc(2*x**3 + 3*x**2 + 5*x + 7, 3) gives result :  -x**3 - x + 1. is there 
some way to get coefficents positive 
instead of negative (i.e. here soln be like: 2*x**3+2*x+1)?

-- 
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/c599ce68-8afc-4876-b253-e790546131df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Derivatives with respect to vectors and matrices expressed as vector and matrix operations

2017-01-11 Thread Alan Bromborsky
Your example is taking the gradient of a scalar function |x2-x1| and
getting a vector function.  See -

https://en.wikipedia.org/wiki/Gradient

My geometric algebra package -

https://github.com/brombo/galgebra

can take the gradient (vector derivative) of a multivector function of
which scalars and vectors are examples (see galgebra.pdf in doc section of
github link).  Note that the vector derivative of a vector function is not
a vector but the sum a scalar and bivector function (see galgebra.pdf).



On Fri, Jan 6, 2017 at 12:41 AM, Kevin Houlihan  wrote:

> Does SymPy have any builtin functionality for expressive derivatives
> w.r.t. vectors and matrices as vector and matrix operations?
>
> By "derivative w.r.t. a vector" I mean a vector of derivatives w.r.t. each
> element. The reason for treating these derivatives differently that just a
> vector of derivatives is that derivatives w.r.t. a vector often can be more
> naturally and conveniently expressed as operations on vectors rather than
> operations on individual elements. The same applies for matrices.
>
> As a simple example of what I'm after:
>
> |v| indicates the common Cartesian norm of a vector v
> x1 and x2 are points in Cartesian space
>
> I want the derivative of |x1 - x2| w.r.t. x1 to evaluate to (x1 -
> x2)/|x1 - x2|.
>
> If this functionality isn't builtin, is there a suggested way to
> approximate or implement it?
>
> From searching the archives, it looks like this topic has been discussed
> and is an area being developed but I can't find any posts from within the
> last year.
>
> I'm not a mathematician or physicist so I may be misusing terminology.
> Please go ahead and ask for clarification if my intent is unclear. In
> particular, I don't know if I should be using the word "gradient" here. In
> the cases I'm familiar with, "gradient" is used in regards to functions of
> a single vector. What I'm trying to describe here applies to functions of
> multiple vectors.
>
> 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/cc351e8c-1b16-477b-93a8-64040c471121%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/CALOxT-%3Dvz%3DLMbiAMLyjX6h8K1ftDdU9%3DGtQGqBG2S2BM6tb6ZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Re: Doing a release

2017-01-11 Thread Aaron Meurer
Do you know how pandas generates those files? Are they generated
programmatically or by hand? Usually having a single file for release
notes gets to be a nightmare because of the merge conflicts.

Aaron Meurer

On Wed, Jan 11, 2017 at 1:46 AM, Shekhar Prasad Rajak
 wrote:
> I think, it will be easy during the new release to see the changes in one
> file, if we add a file in SymPy repo and keep updating it whenever something
> added/modified (Before merging PR). Something like this :
> https://github.com/pandas-dev/pandas/tree/master/doc/source/whatsnew
>
> --
> Shekhar
>
> On Monday, 26 September 2016 22:43:16 UTC+5:30, Aaron Meurer wrote:
>>
>> Now that GSoC has wrapped up, we should start looking at doing a release.
>> As a start, can people
>>
>> - Mark issues and pull requests that need to be completed before the
>> release with the "SymPy 1.1" milestone
>>
>> - Update the release notes with changes that have been merged
>> https://github.com/sympy/sympy/wiki/Release-Notes-for-1.1
>>
>> Any help you can provide on the above two points (especially the release
>> notes) would be greatly appreciated.
>>
>> 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/a3f4a6c5-8a9c-4560-b81b-0841323a8267%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%3D6KnzE2nuGdmovQqs9UtDdPoZb-DHuAp2ReukURE2u8NKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Re: trunc () result

2017-01-11 Thread Kalevi Suominen


On Wednesday, January 11, 2017 at 6:29:40 PM UTC+2, swapnil sharma wrote:
>
> trunc(2*x**3 + 3*x**2 + 5*x + 7, 3) gives result :  -x**3 - x + 1. is there 
> some way to get coefficents positive 
> instead of negative (i.e. here soln be like: 2*x**3+2*x+1)?
>
>
One possibility is to write  trunc(2*x**3 + 3*x**2 + 5*x + 7, 3, 
field=True) to avoid integer coefficients. Otherwise the current 
implementation will attempt to use representatives of least absolute value.

-- 
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/8d0df4e9-efb9-408c-b005-ce2cd6937f35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Re: trunc () result

2017-01-11 Thread swapnil sharma
actually, I wanted to make a program to form extended euclidean 
representation of two polynomials(under a field ) so positive integral 
coefficents is necessary as far as I can see. setting field =True was not 
able to solve it. just out of curiosity, what effect does field =True 
parameter have?

On Wednesday, January 11, 2017 at 11:51:37 PM UTC+5:30, Kalevi Suominen 
wrote:
>
>
>
> On Wednesday, January 11, 2017 at 6:29:40 PM UTC+2, swapnil sharma wrote:
>>
>> trunc(2*x**3 + 3*x**2 + 5*x + 7, 3) gives result :  -x**3 - x + 1. is there 
>> some way to get coefficents positive 
>> instead of negative (i.e. here soln be like: 2*x**3+2*x+1)?
>>
>>
> One possibility is to write  trunc(2*x**3 + 3*x**2 + 5*x + 7, 3, 
> field=True) to avoid integer coefficients. Otherwise the current 
> implementation will attempt to use representatives of least absolute value.
>

-- 
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/d607c307-b58a-4d09-bbb4-b9ff7c692e5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Re: trunc () result

2017-01-11 Thread swapnil sharma
@Kalevi thanx for response. 
Actually, I wanted to make a program to form extended euclidean 
representation of two polynomials(under a field ) so positive integral 
coefficents is necessary as far as I can see. setting field =True was not 
able to solve it. just out of curiosity, what effect does field =True 
parameter have?

On Wednesday, January 11, 2017 at 11:51:37 PM UTC+5:30, Kalevi Suominen 
wrote:
>
>
>
> On Wednesday, January 11, 2017 at 6:29:40 PM UTC+2, swapnil sharma wrote:
>>
>> trunc(2*x**3 + 3*x**2 + 5*x + 7, 3) gives result :  -x**3 - x + 1. is there 
>> some way to get coefficents positive 
>> instead of negative (i.e. here soln be like: 2*x**3+2*x+1)?
>>
>>
> One possibility is to write  trunc(2*x**3 + 3*x**2 + 5*x + 7, 3, 
> field=True) to avoid integer coefficients. Otherwise the current 
> implementation will attempt to use representatives of least absolute value.
>

-- 
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/1a10e98f-0f71-4077-a9a4-44ba197581d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Multiple types of Coordinate Systems for Vectors

2017-01-11 Thread Arihant Parsoya
Hi, 

I have submitted a PR which implementes classes *CoordinateSystem* (Super 
class for remaining coordinate systems), *CartesianCoordinateSystem* and 
*SphericalCoordinateSystem*  using Metric and Lamè coeffecients here 
. Can you 
review it?

Thanks.

On Monday, December 12, 2016 at 10:25:18 PM UTC+5:30, brombo wrote:
>
> Look at my notes.  They may be sufficient.
>
> On Mon, Dec 12, 2016 at 12:32 AM, Sourabh Garg  > wrote:
>
>> Hey,
>>
>> I also want to work on it. if you have any link to book's pdf version 
>> ,please share with me.
>> Thanks
>>
>> Sourabh Garg
>>
>> -- 
>> 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+un...@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/7d1971ba-3411-4e84-820a-8d7789d48459%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/b4dad959-eb7e-4cb9-bac5-96641b5ac5c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Multiple types of Coordinate Systems for Vectors

2017-01-11 Thread Arihant Parsoya
The link to the PR is https://github.com/sympy/sympy/pull/12020

On Thursday, January 12, 2017 at 12:37:35 AM UTC+5:30, Arihant Parsoya 
wrote:
>
> Hi, 
>
> I have submitted a PR which implementes classes *CoordinateSystem* (Super 
> class for remaining coordinate systems), *CartesianCoordinateSystem* and 
> *SphericalCoordinateSystem*  using Metric and Lamè coeffecients here 
> . Can you 
> review it?
>
> Thanks.
>
> On Monday, December 12, 2016 at 10:25:18 PM UTC+5:30, brombo wrote:
>>
>> Look at my notes.  They may be sufficient.
>>
>> On Mon, Dec 12, 2016 at 12:32 AM, Sourabh Garg  
>> wrote:
>>
>>> Hey,
>>>
>>> I also want to work on it. if you have any link to book's pdf version 
>>> ,please share with me.
>>> Thanks
>>>
>>> Sourabh Garg
>>>
>>> -- 
>>> 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+un...@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/7d1971ba-3411-4e84-820a-8d7789d48459%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/03d0ac18-c03d-4839-b957-249b40820e22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Re: trunc () result

2017-01-11 Thread Kalevi Suominen


On Wednesday, January 11, 2017 at 9:00:57 PM UTC+2, swapnil sharma wrote:
>
> @Kalevi thanx for response. 
> Actually, I wanted to make a program to form extended euclidean 
> representation of two polynomials(under a field ) so positive integral 
> coefficents is necessary as far as I can see. setting field =True was not 
> able to solve it. just out of curiosity, what effect does field =True 
> parameter have?
>

By default, the coefficient domain will be the smallest domain containing 
the coefficients of the input polynomial expression. Setting field=True 
will force it to be the smallest field containing the coefficients, the 
field of rational numbers, in this case.

>
> On Wednesday, January 11, 2017 at 11:51:37 PM UTC+5:30, Kalevi Suominen 
> wrote:
>>
>>
>>
>> On Wednesday, January 11, 2017 at 6:29:40 PM UTC+2, swapnil sharma wrote:
>>>
>>> trunc(2*x**3 + 3*x**2 + 5*x + 7, 3) gives result :  -x**3 - x + 1. is there 
>>> some way to get coefficents positive 
>>> instead of negative (i.e. here soln be like: 2*x**3+2*x+1)?
>>>
>>>
>> One possibility is to write  trunc(2*x**3 + 3*x**2 + 5*x + 7, 3, 
>> field=True) to avoid integer coefficients. Otherwise the current 
>> implementation will attempt to use representatives of least absolute value.
>>
>

-- 
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/f956386b-1f9e-435c-a408-ae5e76122d82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Re: Doing a release

2017-01-11 Thread Jason Moore
SciPy does it too: https://github.com/scipy/scipy/tree/master/doc/release
and the notes seem quite comprehensive and well organized.

To avoid merge conflicts we could require a single file for each item in
the notes to be added and then a script compiles the full note set from
those.


Jason
moorepants.info
+01 530-601-9791

On Wed, Jan 11, 2017 at 10:20 AM, Aaron Meurer  wrote:

> Do you know how pandas generates those files? Are they generated
> programmatically or by hand? Usually having a single file for release
> notes gets to be a nightmare because of the merge conflicts.
>
> Aaron Meurer
>
> On Wed, Jan 11, 2017 at 1:46 AM, Shekhar Prasad Rajak
>  wrote:
> > I think, it will be easy during the new release to see the changes in one
> > file, if we add a file in SymPy repo and keep updating it whenever
> something
> > added/modified (Before merging PR). Something like this :
> > https://github.com/pandas-dev/pandas/tree/master/doc/source/whatsnew
> >
> > --
> > Shekhar
> >
> > On Monday, 26 September 2016 22:43:16 UTC+5:30, Aaron Meurer wrote:
> >>
> >> Now that GSoC has wrapped up, we should start looking at doing a
> release.
> >> As a start, can people
> >>
> >> - Mark issues and pull requests that need to be completed before the
> >> release with the "SymPy 1.1" milestone
> >>
> >> - Update the release notes with changes that have been merged
> >> https://github.com/sympy/sympy/wiki/Release-Notes-for-1.1
> >>
> >> Any help you can provide on the above two points (especially the release
> >> notes) would be greatly appreciated.
> >>
> >> 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/a3f4a6c5-8a9c-
> 4560-b81b-0841323a8267%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%3D6KnzE2nuGdmovQqs9UtDdPoZb-DHuAp2ReukURE2u8NKw%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/CAP7f1AiN4wzhTfXxg%3DBqMyNR1ghCu-Ri_HWEvkX3RkWKmphrww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sympy] Re: Doing a release

2017-01-11 Thread Aaron Meurer
So let's figure out how they do it. Does someone do it by hand, or do
they just deal with the conflicts somehow?

I'm +1 to doing this somehow, because the current process isn't
working. We either need a process wherein everyone updates the release
notes with their pull requests (has to be done at the same time or
people won't do it), or just deal with release notes that are
generated automatically (I believe this is what the IPython/Jupyter
guys do).

Aaron Meurer

On Wed, Jan 11, 2017 at 4:55 PM, Jason Moore  wrote:
> SciPy does it too: https://github.com/scipy/scipy/tree/master/doc/release
> and the notes seem quite comprehensive and well organized.
>
> To avoid merge conflicts we could require a single file for each item in the
> notes to be added and then a script compiles the full note set from those.
>
>
> Jason
> moorepants.info
> +01 530-601-9791
>
> On Wed, Jan 11, 2017 at 10:20 AM, Aaron Meurer  wrote:
>>
>> Do you know how pandas generates those files? Are they generated
>> programmatically or by hand? Usually having a single file for release
>> notes gets to be a nightmare because of the merge conflicts.
>>
>> Aaron Meurer
>>
>> On Wed, Jan 11, 2017 at 1:46 AM, Shekhar Prasad Rajak
>>  wrote:
>> > I think, it will be easy during the new release to see the changes in
>> > one
>> > file, if we add a file in SymPy repo and keep updating it whenever
>> > something
>> > added/modified (Before merging PR). Something like this :
>> > https://github.com/pandas-dev/pandas/tree/master/doc/source/whatsnew
>> >
>> > --
>> > Shekhar
>> >
>> > On Monday, 26 September 2016 22:43:16 UTC+5:30, Aaron Meurer wrote:
>> >>
>> >> Now that GSoC has wrapped up, we should start looking at doing a
>> >> release.
>> >> As a start, can people
>> >>
>> >> - Mark issues and pull requests that need to be completed before the
>> >> release with the "SymPy 1.1" milestone
>> >>
>> >> - Update the release notes with changes that have been merged
>> >> https://github.com/sympy/sympy/wiki/Release-Notes-for-1.1
>> >>
>> >> Any help you can provide on the above two points (especially the
>> >> release
>> >> notes) would be greatly appreciated.
>> >>
>> >> 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/a3f4a6c5-8a9c-4560-b81b-0841323a8267%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%3D6KnzE2nuGdmovQqs9UtDdPoZb-DHuAp2ReukURE2u8NKw%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/CAP7f1AiN4wzhTfXxg%3DBqMyNR1ghCu-Ri_HWEvkX3RkWKmphrww%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.

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