[sympy] Help with using Matrix on x.y pair

2012-11-12 Thread Shriramana Sharma
rix in the process of find inv(A) ???). Any guidance you people can provide in this regard would be most appreciated. Thank you! -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@go

Re: [sympy] Help with using Matrix on x.y pair

2012-11-12 Thread Shriramana Sharma
i and thanks for your reply. As I said, I'm trying to merge Beziers. Perhaps it would help if I separately solved using the x and y coefficients (since parametric Bezier curves are handled that way anyhow). I'll try that and get back if I have any more questions. -- Shriramana Sharma

[sympy] simplify() not reversing the effects of expand()

2012-11-14 Thread Shriramana Sharma
11]: ax**2*vy**2 - 2*ax*ay*vx*vy + ay**2*vx**2 In [12]: simplify(((ax*vy-ay*vx)**2).expand()) Out[12]: ax**2*vy**2 - 2*ax*ay*vx*vy + ay**2*vx**2 -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to t

Re: [sympy] simplify() not reversing the effects of expand()

2012-11-14 Thread Shriramana Sharma
Thanks both for your very useful replies! :-) -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to symp

[sympy] How to define a symbolic function which involves another function

2012-11-17 Thread Shriramana Sharma
ff stuff, I still get the same error. I would most appreciate it if anyone could advise me on what to do. Thanks! -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@g

Re: [sympy] How to define a symbolic function which involves another function

2012-11-18 Thread Shriramana Sharma
On Sun, Nov 18, 2012 at 1:29 PM, Chris Smith wrote: > >>>> def f(l, i): > ... return lamb * ( 1 + (-mu)**(l+i) ) * binomial(l+i,i) > ... This is what I ended up figuring out myself! Anyhow, thanks for the detailed explanation. I'll be back with more queries later.

Re: [sympy] How to define a symbolic function which involves another function

2012-11-18 Thread Shriramana Sharma
On Sun, Nov 18, 2012 at 3:03 PM, Shriramana Sharma wrote: > I'll be back with more queries later. :-) OK so here's my next query on the same thread: In [1]: from sympy import * ...: i,j=symbols('i j',integer=True) ...: lamb=list(symbols('lamb:4')) ...:

Re: [sympy] How to define a symbolic function which involves another function

2012-11-18 Thread Shriramana Sharma
On Sun, Nov 18, 2012 at 8:16 PM, Shriramana Sharma wrote: > >...: summation(lamb[i]*(-1)**(n-j)*binomial(i,n-j),(i,n-j,n)) One logical error I found in the above line is that j doesn't have a definite (integer) value, so how can summation run i from n-j to n, but even when I a

Re: [sympy] How to define a symbolic function which involves another function

2012-11-18 Thread Shriramana Sharma
y coming to think that successful use of SymPy involves use of both Python and SymPy semantics, right? If I do the summation manually i.e. using Py semantics, it's quite straightforward, but my query is how to do it using SymPy's summation semantics. Thanks ever more for your kind help! :-)

Re: [sympy] How to define a symbolic function which involves another function

2012-11-18 Thread Shriramana Sharma
[4]: lamb0=4 In [5]: lamb Out[5]: [lamb0, lamb1, lamb2, lamb3] In [6]: lamb[0] Out[6]: lamb0 In [7]: type(lamb[0]) Out[7]: sympy.core.symbol.Symbol In [8]: type(lamb0) Out[8]: builtins.int I don't get it -- there are *two* objects with name lamb0 in the current namespace? How can that be?

[sympy] Need to query a polynomial for the coefficient of a given degree of the var

2012-11-28 Thread Shriramana Sharma
2*Ra(4)*Ra(6) + Ra(5)**2 11 2*Ra(5)*Ra(6) 12 Ra(6)**2 Thanks! -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group

Re: [sympy] Need to query a polynomial for the coefficient of a given degree of the var

2012-11-28 Thread Shriramana Sharma
On Thu, Nov 29, 2012 at 8:22 AM, Aaron Meurer wrote: > In that case, just use expr.coeff(t, n). Aaron and Chris, thank you both for your reply. I was looking under Poly but apparently this is a generic method for Expr. -- Shriramana Sharma -- You received this message because you

[sympy] How to define a symbolic function

2012-11-29 Thread Shriramana Sharma
hould define Python functions using def Pplus(i,t) and def P(t) or I should define symbolic functions using lambdify and implemented_function. Sorry if I sound lost, because I *am* lost -- I am not yet able to figure out the SymPy way of doing things. -- Shriramana Sharma -- You received this me

Re: [sympy] How to define a symbolic function

2012-11-30 Thread Shriramana Sharma
t does not resolve it until an operable (i.e. numeric) value is specified, just like the binomial function's behavious below: In [10]: var('n,i',integer=True) Out[11]: (n, i) binomial(n,i) Out[12]: binomial(n, i) binomial(5,2) Out[13]: 10 Thanks, and sorry again for the extreme noob

[sympy] SymPy thrown into infinite loop

2012-11-30 Thread Shriramana Sharma
mation(t**i*Ra(i),(i,0,5))) Thanks! -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com

Re: [sympy] SymPy thrown into infinite loop

2012-11-30 Thread Shriramana Sharma
Dec 1, 2012 at 8:30 AM, Shriramana Sharma wrote: > print(summation(t**i*Ra(i),(i,0,5))) Curiously replacing 5 by n, i.e. as print(summation(t**i*Ra(i),(i,0,n))) gives the output: Sum(t**i*Sum((-1)**(i + j)*ival(j)*binomial(i, j)*binomial(n, i), (j, 0, i)), (i, 0, n)) so only when the actual finite ev

Re: [sympy] SymPy thrown into infinite loop

2012-11-30 Thread Shriramana Sharma
On Sat, Dec 1, 2012 at 9:13 AM, Shriramana Sharma wrote: >> easy way to fix it is to use summation(t**i*Ra(i),(i,0,5)).doit(). > > Wow nice, that works! ... but the problem is that it expands the binomial function too and the output is not so readable as a result: t**5*(-n*(n - 4

Re: [sympy] SymPy thrown into infinite loop

2012-11-30 Thread Shriramana Sharma
of the bug I can report it. -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com.

Re: [sympy] SymPy thrown into infinite loop

2012-11-30 Thread Shriramana Sharma
On Sat, Dec 1, 2012 at 10:15 AM, Aaron Meurer wrote: > The bug here is that the binomial(n, 5) is automatically evaluating > itself. It should remain unevaluated, except when expand(func=True) > is called on it. Reported http://code.google.com/p/sympy/issues/detail?id=3544 -- S

Re: [sympy] How to define a symbolic function which involves another function

2012-12-01 Thread Shriramana Sharma
Py way to use subscripted variables? That is, I want x0 x1 etc and need to be able to specify them by x and 0,1 etc. Of course, symbols('x'+str(i)) would work but it is a hack, and it wouldn't make it convenient to construct expressions using such subscripted variables... Thanks

Re: [sympy] Help with using Matrix on x.y pair

2012-12-01 Thread Shriramana Sharma
;s not clear why it is happening or how to fix it without seeing your > definition if QPointF. http://riverbankcomputing.com/static/Docs/PyQt4/html/qpointf.html -- I suppose that definition isn't SymPy-compatible? -- Shriramana Sharma -- You received this message because you are subscr

Re: [sympy] How to define a symbolic function which involves another function

2012-12-01 Thread Shriramana Sharma
symbolic variables in SymPy? -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com.

Re: [sympy] How to define a symbolic function which involves another function

2012-12-01 Thread Shriramana Sharma
expert programmer, but I hope you get what kind of functionality I am expecting... -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this gro

Re: [sympy] How to define a symbolic function which involves another function

2012-12-01 Thread Shriramana Sharma
tributeError: 'int' object has no attribute 'free_symbols' The subscriptable symbol which I expect should be able to handle the above solve command. Or if I have to alter my usage slightly (i.e. without using all that atoms etc) for IndexedBase itself (or some existing subclass the

Re: [sympy] How to define a symbolic function which involves another function

2012-12-01 Thread Shriramana Sharma
c indices. Try: avals=list(symbols('a:10')) i=symbols('i',integer=True) print(summation(avals[i],(i,0,9))) and you will see what I am talking about. -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To p

Re: [sympy] How to define a symbolic function which involves another function

2012-12-01 Thread Shriramana Sharma
used with solve(), right? So this doesn't really seem to be a solution... -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send ema

Re: [sympy] How to define a symbolic function which involves another function

2012-12-01 Thread Shriramana Sharma
and 2. Alas, all it knows is the combined > string "X_12". Wouldn't it be advisable to separate the row and col indices in the subscript: X₁,₂ ? Otherwise how to go beyond 9? -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "

Re: [sympy] How to define a symbolic function which involves another function

2012-12-02 Thread Shriramana Sharma
ymPy. Since subscripted (i.e. indexed) variables (and in some case even super+sub-scripted or i.o.w. multi-index variables) are widely used in mathematics I hope I would not be the only person to be benefited. -- Shriramana Sharma -- You received this message because you are subscribed to the Goo

Re: [sympy] How to define a symbolic function which involves another function

2012-12-02 Thread Shriramana Sharma
2, -3*A[0]+ 6*A[1] - 15])) Hi can you clarify why you have used a * inside the Tuple constructor in both the above cases and why the additional () around the [] containing the list in the second case? The Tuple documentation doesn't seem to speak about either of these two. Thanks! -- Shri

Re: [sympy] How to define a symbolic function which involves another function

2012-12-02 Thread Shriramana Sharma
Sorry for the extra mail! On Sun, Dec 2, 2012 at 10:04 PM, Shriramana Sharma wrote: > Hi can you clarify why you have used a * inside the Tuple constructor > in both the above cases and why the additional () around the [] > containing the list in the second case? The Tuple docu

[sympy] How to find out the matrices that solve produces to solve a set of equations

2012-12-02 Thread Shriramana Sharma
ients and not variables... Thanks! -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroup

Re: [sympy] How to find out the matrices that solve produces to solve a set of equations

2012-12-03 Thread Shriramana Sharma
endent(*X) etc :-) -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For

Re: [sympy] How to find out the matrices that solve produces to solve a set of equations

2012-12-03 Thread Shriramana Sharma
On Mon, Dec 3, 2012 at 4:25 PM, Shriramana Sharma wrote: > Hey nice! Do I understand correctly this mean that pulling the latest > Git (yes I've become a cloner) will allow me to use IndexedBase > objects like this? OK now pulled latest git but I understand this is not into trunk

Re: [sympy] How to find out the matrices that solve produces to solve a set of equations

2012-12-03 Thread Shriramana Sharma
bove, however, looks a little more text-bookish > and easier on the fingers. Definitely! First I was scared off by that as_independent(*X) etc which you had previously suggested, but this is very neat and understandable. -- Shriramana Sharma -- You received this message because

[sympy] Difference between replace and subs?

2012-12-03 Thread Shriramana Sharma
rmatted -- just thought I'd mention.) Thank you! -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsub

Re: [sympy] Difference between replace and subs?

2012-12-05 Thread Shriramana Sharma
superficial but I'll be back if I have any further problems later. The following error message which I got was very useful to know as well: >>> e=x**2 >>> e.replace(2,3) TypeError: first argument to replace() must be a type, an expression or a callable -- Shriramana Sharma

[sympy] How to get interactive MathJax display like SymPy

2012-12-05 Thread Shriramana Sharma
MathJax-style output. Instructions would be *most* appreciated. (I have libjs-mathjax installed as a dependency of ipython3-notebook. Running Kubuntu Precise with latest updates.) Thank you! -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "

Re: [sympy] How to get interactive MathJax display like SymPy

2012-12-05 Thread Shriramana Sharma
y much! I have backported the latest IPython (0.13.1) to Precise so I used the latter. -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from th

[sympy] Why does slicing a vector matrix return a builtins.list?

2012-12-13 Thread Shriramana Sharma
provide? (This might even be considered a bug.) Thanks. -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+uns

Re: [sympy] Why does slicing a vector matrix return a builtins.list?

2012-12-14 Thread Shriramana Sharma
rator[] but at the same time provide consistent output from operator() of type Matrix only. BTW I hope that the output of such an operator() can be used as both lvalue and rvalue (else it wouldn't be useful)... -- Shriramana Sharma -- You received this message because you are subscribed t

[sympy] Why doesn't Matrix support replace

2012-12-14 Thread Shriramana Sharma
unnecessary IMHO. Is there a reason why Matrix cannot directly support replace when it can support subs (as seen in even the tutorial)? -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email

Re: [sympy] Why doesn't Matrix support replace

2012-12-14 Thread Shriramana Sharma
can be provided out of the box IMO -- just like is available with simplify(). -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group,

[sympy] Trouble with getting latex_ex to work

2012-12-16 Thread Shriramana Sharma
) ) c = a * b print ( a, "*", b, "=", c ) x, y = symbols ( 'x, y' ) d = Matrix ( 1, 2, ( x ** 3, y ** 3 ) ) e = Matrix ( 2, 2, ( x ** 2, 2 * x * y, 2 * x * y, y ** 2 ) ) f = d * e print ( d, "*", e, "=", f ) tex . xdvi () -- Shriramana Sha

Re: [sympy] Trouble with getting latex_ex to work

2012-12-26 Thread Shriramana Sharma
nce for the matrix to easily read the equations I'm handling. I don't need to include anything into a TeX document (for now). @Alan: Thanks for the package. I'll get around to testing it later. (Currently working on some other parts of my project.) -- Shriramana Sharma -- You receive

[sympy] nroots and rev-lex

2012-12-26 Thread Shriramana Sharma
**2 etc. However it doesn't seem as if isympy supports the ipython Qt console (please tell me if I am mistaken). So I'd like to how to manually set the printing order? Thanks. -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy&

Re: [sympy] nroots and rev-lex

2012-12-27 Thread Shriramana Sharma
in the same help, under order, there is no entry for rev-lex. It is not also clear that revlex, rev-lex both are accepted. Can you please update the docstring? Thanks. -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To po

Re: [sympy] nroots and rev-lex

2012-12-28 Thread Shriramana Sharma
Console session, and do the following: from sympy import * init_session(order='rev-lex',use_latex=True) var('t') t+t**2+1 I only get the regular pretty printing. I have TeXLive 2012 installed on my system from PPA. Using SymPy 0.7.2 on Py 3.2.3. -- Shriramana Sharma --

Re: [sympy] nroots and rev-lex

2012-12-28 Thread Shriramana Sharma
On Fri, Dec 28, 2012 at 6:48 PM, Shriramana Sharma wrote: > Uh oh, looks like I spake too soon. Durand-Kerner stumbles over itself > in cases of multiple roots being identical. There is already this bug upstream: http://code.google.com/p/mpmath/issues/detail?id=217 -- Shriramana

Re: [sympy] nroots and rev-lex

2012-12-29 Thread Shriramana Sharma
hat else I have to do, thanks! -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com

Re: [sympy] nroots and rev-lex

2012-12-31 Thread Shriramana Sharma
#x27;grevlex'? i.e. what is this "graded reverse lexicographic" ordering? Thanks. -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from

[sympy] Why isn't SymPy able to solve this polynomial equation?

2013-01-09 Thread Shriramana Sharma
separately: v0.17.2) and my durandkerner implementation are able to do it. Should I report this as as bug? -- Shriramana Sharma -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To u

[sympy] LaTeX output of i in complex numbers not correct?

2013-01-16 Thread Shriramana Sharma
t * In [2]: var('x y') Out[2]: (x, y) In [3]: latex(x+I*y) Out[3]: 'x + \\mathbf{\\imath} y' In [4]: latex(2+I*3) Out[4]: '2 + 3 \\mathbf{\\imath}' ... that mathbf does not have all symbols so it should not be used for this purpose. Anyone to confirm/deny? --

[sympy] Evaluating limit of curvature of a bezier at a cusp

2013-06-15 Thread Shriramana Sharma
e seems to fail. What is the method by which SymPy arrives at this result? Thank you! -- Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails f

Re: [sympy] Evaluating limit of curvature of a bezier at a cusp

2013-06-16 Thread Shriramana Sharma
ively differentiated numerators and denominators (as per L'Hopital) I ran up against the same problem as before, i.e. when the numerator becomes non-zero, the denominator becomes a NaN. Perhaps I should sub-apply L'Hopital to the denominator to resolve the NaN status. Thanks anyhow... --

[sympy] Problem with using SymPyPrt on both IPy2 and IPy3

2013-06-16 Thread Shriramana Sharma
ames&suite=all§ion=all except for a new build. The changelog says it's for some kpathsea transition but I'm not sure whether that would be the cause of the problem. Should I ask about this on some other list perhaps? -- Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा -- You received

[sympy] Re: Problem with using SymPyPrt on both IPy2 and IPy3

2013-06-16 Thread Shriramana Sharma
So I also tried this in IPython3 Notebook, but again some problem: In [1]: %load_ext sympy.interactive.ipythonprinting from sympy import * var('x') Out[1]: [Math Processing Error] Using Firefox 21. -- Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा -- You received this message b

Re: [sympy] Re: Problem with using SymPyPrt on both IPy2 and IPy3

2013-06-16 Thread Shriramana Sharma
On Mon, Jun 17, 2013 at 12:28 AM, Aaron Meurer wrote: > What versions of SymPy and IPython are you using? Sorry about that -- python3-sympy 0.7.2-1raring1 and ipython3 0.13.2-1. -- Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा -- You received this message because you are subscribed to

Re: [sympy] Re: Problem with using SymPyPrt on both IPy2 and IPy3

2013-06-16 Thread Shriramana Sharma
*", did "%load_ext sympyprt" or "%load_ext sympyprt3" and so far no problems, but as usual when I do var('x'), I should get the beautified x output but I get a segfault notification on the terminal and the same dvipng error notification within IPy. -- Shriramana Sh

Re: [sympy] Re: Problem with using SymPyPrt on both IPy2 and IPy3

2013-06-16 Thread Shriramana Sharma
pt]{article} \usepackage{amsmath,amssymb} \pagestyle{empty} \begin{document} $ \infty $ \end{document} produces a segfault. I have asked about this over at http://lists.nongnu.org/archive/html/dvipng/ (but the archives apparently need some time to be updated.) -- Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्

Re: [sympy] Re: Problem with using SymPyPrt on both IPy2 and IPy3

2013-06-17 Thread Shriramana Sharma
On Mon, Jun 17, 2013 at 10:43 AM, Shriramana Sharma wrote: > produces a segfault. I have asked about this over at > http://lists.nongnu.org/archive/html/dvipng/ (but the archives > apparently need some time to be updated.) Hm -- I finally traced this segfault back to dvipng's sou