[sage-support] modulo operator for reals

2010-10-04 Thread jpc
Why does the plot plot(k%1,k,0,5) is not produced but the following works: k=var('k') plot( k/1, k,0,5).show() print 1.9%1 What can be used instead ? Pedro -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+

[sage-support] Re: BoxPlot in Sage: how do we plot?

2010-03-14 Thread jpc
There is matplotlib http://matplotlib.sourceforge.net/examples/pylab_examples/boxplot_demo.html?highlight=boxplot http://matplotlib.sourceforge.net/plot_directive/mpl_examples/pylab_examples/boxplot_demo.py I also didn't get it with R in sage (or python). Pedro Cruz On Mar 14, 7:22 am, mo wr

[sage-support] Re: Simple multiprocessing example in Sage-Notebook

2010-03-07 Thread jpc
I've tried with print pool.map(f, range(10)) instead of pool.map(f, range(10)) calling python file.py In the notebook, the output must be caughted and printed for user, I think. Pedro On Mar 7, 5:23 am, Gokhan Sever wrote: > Hello, > > I am executing this example in Sage Notebook

[sage-support] Re: json and sage

2010-02-20 Thread jpc
) print TrivialSageJSON().encode({"a": 123}) If any thing better (more general) appears please let me know. Thanks, Pedro On Feb 20, 12:17 am, Mike Hansen wrote: > On Fri, Feb 19, 2010 at 3:52 PM, jpc wrote: > > Should one do the "type cast" below for every int or floa

[sage-support] json and sage

2010-02-19 Thread jpc
Python json library is of simple use but there's this problem: sage: import json sage: json.dumps( {"a": 1.8} ) ...produce an error because: sage: x = 1.8 sage: type(x) Should one do the "type cast" below for every int or float when using sage ? sage: type(float(x)) sage: json.dumps( {"a": flo

[sage-support] Re: examples of using R

2010-01-29 Thread jpc
Hi, I've search on http://rpy.sourceforge.net/ and use R with commands inside a Sage script as following: from sage.all import * def iunif(a,b): return Integer(fround(r.runif(1,RDF(a),RDF(b)),0)) def runif(a,b,prec): return RDF(fround(r.runif(1,RDF(a),RDF(b)),prec)) def rbernoulli():

[sage-support] Re: Just integral

2009-04-17 Thread jpc
In a sage notebook one can write: %latex $\int_a^b x dx$ to *see the integral*. Or is other problem? --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@g

[sage-support] Re: find_root reports zeroes of denominator as roots

2009-03-16 Thread jpc
hat continuity of $f$ is necessary. jpc On Mar 15, 3:54 am, yacob wrote: > f(x)=1/x > r1=find_root(f,-1,1);r1 > -1.8189894035440371e-12 --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from th