[sage-support] ValueError: setting an array element with a sequence. when plotting R data

2011-06-07 Thread Rolf
There is a well known problem (http://ask.sagemath.org/question/192/ compiling-r-with-png-support) with plotting in R that apparently some people successfully eliminated by installing the libraries mentioned and recompiling. I didn’t succeed, so I'm trying a work around and stumbled over an other

[sage-support] Re: ValueError: setting an array element with a sequence. when plotting R data

2011-06-07 Thread Rolf
Problem solved! The simple '._sage_()' does the trick. It converts data from R into something that can be handled by Python or Sage. def ndistribpts(x): return (x,r.dnorm(x,mean=100,sd=25)._sage_()) def cube(x): return (x,x*x*x) v=map(ndistribpts,range(98,103)) scatter_plot(v) Works though I'm

[sage-support] Re: ValueError: setting an array element with a sequence. when plotting R data

2011-06-07 Thread kcrisman
On Jun 7, 7:08 am, Rolf kamha...@googlemail.com wrote: Problem solved! The simple '._sage_()' does the trick. It converts data from R into something that can be handled by Python or Sage. Glad you found a solution! def ndistribpts(x): return (x,r.dnorm(x,mean=100,sd=25)._sage_()) def

[sage-support] Re: Binding Python to HTML/CSS/Javascript

2011-06-07 Thread Owen
Great pointers, Jason .. thanks. -- Owen -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL:

[sage-support] Re: Binding Python to HTML/CSS/Javascript

2011-06-07 Thread Jason Grout
On 6/7/11 12:05 PM, Owen wrote: Great pointers, Jason .. thanks. More generally, you can explore Flask or Django, which are two standard python webserving frameworks. Jason -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to

[sage-support] sum of complex numbers

2011-06-07 Thread Samuel Lelievre
Can we not use + to add complex numbers? sage: j = -1/2 + sqrt(3)/2*i sage: a = -2*j*j sage: b = -j/2 sage: print a.real(); print b.real(); print (a+b).real() 1 1/4 + 1/4 -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to

Re: [sage-support] sum of complex numbers

2011-06-07 Thread Burcin Erocal
On Tue, 7 Jun 2011 12:17:58 -0700 (PDT) Samuel Lelievre samuel.lelie...@gmail.com wrote: Can we not use + to add complex numbers? sage: j = -1/2 + sqrt(3)/2*i sage: a = -2*j*j sage: b = -j/2 sage: print a.real(); print b.real(); print (a+b).real() 1 1/4 + 1/4 With Sage 4.7.alpha1, I

Re: [sage-support] sum of complex numbers

2011-06-07 Thread slelievre
2011-06-07 Burcin Erocal: On Tue, 7 Jun 2011, Samuel wrote: Can we not use + to add complex numbers? sage: j = -1/2 + sqrt(3)/2*i sage: a = -2*j*j sage: b = -j/2 sage: print a.real(); print b.real(); print (a+b).real() 1 1/4  + 1/4 With Sage 4.7.alpha1, I get: sage: sage: j = -1/2 +

Re: [sage-support] sum of complex numbers

2011-06-07 Thread slelievre
2011/6/7 slelievre: 2011-06-07 Burcin Erocal: On Tue, 7 Jun 2011, Samuel wrote: Can we not use + to add complex numbers? sage: j = -1/2 + sqrt(3)/2*i sage: a = -2*j*j sage: b = -j/2 sage: print a.real(); print b.real(); print (a+b).real() 1 1/4  + 1/4 With Sage 4.7.alpha1, I get:

[sage-support] Re: Piecewise functions that are discontinuous in one point

2011-06-07 Thread kcrisman
On Jun 7, 9:58 pm, Felipo Bacani felipo.bac...@gmail.com wrote: Hello. How do I define a piecewise function that are discontinuous in one point? I mean, how do I define a piecewise function f(x) if it is like         x    if 0x1 f(x)=2    if x=1         2-x if 1x2 If I try the command

[sage-support] Re: sum of complex numbers

2011-06-07 Thread kcrisman
We use Pynac for deciding on default printing of things like this, I think. So one of the tickets related to this is most likely. Probably http://trac.sagemath.org/sage_trac/ticket/9947. You can see strange things with coefficients there as well. Glad it's fixed for you there! - kcrisman --

Re: [sage-support] Re: Trouble with sage installation on Ubuntu 11.04

2011-06-07 Thread Jan Groenewald
Hi This is now http://trac.sagemath.org/sage_trac/ticket/11447 Bill, please replace SAGE_ROOT/spkg/standard/python-2.6.4.p10.spkg with http://users.aims.ac.za/~jan/python-2.6.4.p11.spkg, and then run make again. Regards, Jan -- .~. /V\ Jan Groenewald /( )\www.aims.ac.za