[sage-support] Re: converting strings to latex

2010-05-06 Thread ablondin
Ok, I think I understand your problem. I had something similar before. The problem is that the object returned by the function sarrus is a 'str', which sagetex format so that it replaces every underscore, etc. with \_ to make it work in Latex. If you don't want the output to be modified, you have t

[sage-support] Re: converting strings to latex

2010-05-05 Thread ablondin
Hello, Georg ! If I understand correctly your question, you would like to convert arithmetical expressions directly into Latex. I don't know if it is possible to do it in Sage, but you could always write your own function. I've written a small one that should do the trick. def sarrus(A): brack

[sage-support] Re: converting an R vector to a list

2010-04-13 Thread ablondin
I answered myself. It suffices to call sageobj on it. sage: x = r.c([1,2,3]) sage: x [1] 1 2 3 sage: list(x) [[1] 1, [1] 2, [1] 3] sage: sage: sage: sage: sageobj(x) [1, 2, 3] sage: type(sageobj(x)) Thanks anyway ! On 13 avr, 10:23, ablondin wrote: > Dear Sage community, > I'm tr

[sage-support] converting an R vector to a list

2010-04-13 Thread ablondin
Dear Sage community, I'm trying to use the R interface (which means I have to learn R as well) and it's not going too bad, but I have no idea how I can transform an R object (a vector) to get the associated list. For instance, if I type sage: x = r.c([1,2,3]) sage: x [1] 1 2 3 sage: list(x) [[1] 1,

[sage-support] Re: graph circuits in Sage

2010-02-28 Thread ablondin
I forgot to precise that I would submit another for undirected cycles. Alex On 28 fév, 20:32, ablondin wrote: > Hello, David ! > As Nathann mentionned, I've already submitted a patch which allows one > to enumerate paths and cycles in directed graphs with a lot of > possible p

[sage-support] Re: graph circuits in Sage

2010-02-28 Thread ablondin
Hello, David ! As Nathann mentionned, I've already submitted a patch which allows one to enumerate paths and cycles in directed graphs with a lot of possible parameters (length, starting and ending vertices, etc.). Since it has received positive review, I'll submit another one for the next week, so

[sage-support] Re: Creating real number from iterator on infinite list ?

2010-01-28 Thread ablondin
Thanks ! This is exactly what I meant. Where shoud it be placed, though ? In the constructor of real numbers or in the CFF constructor ? I guess I could do it, but I'm just starting developing for Sage... Alex On 28 jan, 14:11, Dan Drake wrote: > On Thu, 28 Jan 2010 at 04:21AM -0800,

[sage-support] Creating real number from iterator on infinite list ?

2010-01-28 Thread ablondin
Hello, everyone, I would like to create a real number from its continued fraction expansion. I know it is possible to call ``CFF([0,1,1,1,1,1,1]).value() `` to have an approximation of the golden ratio, but I would like to pass an iterator as an argument to the function ``CFF(...)`` so that I can g

[sage-support] Poisson law, binomial law, etc.

2009-10-25 Thread ablondin
Hey, everyone ! Is there a place where I can find probability law like Poisson, binomial, hypergeometric, etc. ? It doesn't seem to appear neither in TimeSeries nor Probability section of sage. Thanks for your help ! Alexandre --~--~-~--~~~---~--~~ To post to this g

[sage-support] Re: 2d graphics using polar coordinates

2009-09-27 Thread ablondin
I forgot to mention that in polar coordinates, it would be something like line([(0.9,theta), (1.1, theta)]) which is more convenient. Alexandre Blondin Massé On 27 sep, 18:02, ablondin wrote: > Hello everybody, > I think I'm not looking correctly, but is there any way to use the >

[sage-support] 2d graphics using polar coordinates

2009-09-27 Thread ablondin
Hello everybody, I think I'm not looking correctly, but is there any way to use the circle, line, polygon functions to draw 2d graphics using polar coordinates ? I would like to draw things on the unit circle and if it possible, to avoid writing line([(0.9*cos(theta), 0.9*sin(theta), (1.1*cos(thet

[sage-support] statistics in sage

2009-09-26 Thread ablondin
Hello, everybody ! Do you know how we can compute standard statistics on lists in sage ? For instance, if I have a list of 100 reals, how can I compute the mean of this list, the standard deviation, the variance, the median, the mode, etc. Are there predefined functions in sage or do I need to wri