[sage-support] sage install on Darwin

2011-03-28 Thread Jeffrey
Hi. I'm working on a Mac G5 & trying to install Sage. Darwin needs packages installed in site-packages within Python folders in Frameworks. But the Sage binary has two versions of Python inside Sage with additional packages & more Sage folders inside the various Python versions. So I end up with

Re: [sage-support] using random seed for sample() function

2011-03-28 Thread D. S. McNeil
On Tue, Mar 29, 2011 at 4:00 AM, tvn wrote: > I'd like to be able to regenerate  samples by feeding a seed value to > random.seed()  ,  but it seems sample() doesn't use this random seed.  Is > there a way to do what I want ? help(sage.misc.randstate) explains a lot of the gory details. set_rand

[sage-support] using random seed for sample() function

2011-03-28 Thread tvn
I'd like to be able to regenerate samples by feeding a seed value to random.seed() , but it seems sample() doesn't use this random seed. Is there a way to do what I want ? Thanks, sage: random.seed(1) sage: random.random() 0.13436424411240122 sage: sample(range(5),2) [4, 1] sage: random.s

[sage-support] Re: Plot order in Graphics() object

2011-03-28 Thread kcrisman
On Mar 28, 7:55 am, Jason Grout wrote: > On 3/27/11 9:48 AM, Jeroen Demeyer wrote: > > > On 2011-03-25 11:28, Jason Grout wrote: > >> You should be able to use the zorder parameter.  If that doesn't work, > >> it's a bug. > > > That works indeed, but I didn't know about the existence of the zord

Re: [sage-support] How to run a Magma computation with a timeout

2011-03-28 Thread William Stein
On Mon, Mar 28, 2011 at 8:15 AM, Tzanko Matev wrote: > Hi, > > I want to run a certain computation in Magma from a Sage script, > however I would like to interrupt the computation if it takes longer > than a set amount of time. Is it possible to do that? > Thanks in advance, > Tzanko Matev Depend

[sage-support] Re: Elliptic Integral Code Very Slow

2011-03-28 Thread kcrisman
On Mar 28, 12:13 pm, ObsessiveMathsFreak wrote: > Perfect. That was exactly what I needed. Yeah, it may be time to wrap some of our evaluation methods for special functions as using mpmath or scipy. There are a number of open tickets about this. > > > If you mean complete elliptic integrals

[sage-support] Re: Elliptic Integral Code Very Slow

2011-03-28 Thread ObsessiveMathsFreak
Perfect. That was exactly what I needed. On Mar 28, 4:11 pm, achrzesz wrote: > If you mean complete elliptic integrals of the second kind then: > > sage: from scipy.special  import ellipe > sage: time pts=[ellipe(1.0/(1.0+0.01*k)) for k in range(1,101)] > CPU times: user 0.01 s, sys: 0.00 s, tota

[sage-support] Re: Elliptic Integral Code Very Slow

2011-03-28 Thread achrzesz
If you need more precision,you can also use mpmath sage: from mpmath import * sage: time pts=[ellipe(1.0/(1.0+0.01*k)) for k in range(1,101)] CPU times: user 0.03 s, sys: 0.00 s, total: 0.03 s Wall time: 0.03 s -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe

[sage-support] How to run a Magma computation with a timeout

2011-03-28 Thread Tzanko Matev
Hi, I want to run a certain computation in Magma from a Sage script, however I would like to interrupt the computation if it takes longer than a set amount of time. Is it possible to do that? Thanks in advance, Tzanko Matev -- To post to this group, send email to sage-support@googlegroups.com To

[sage-support] Re: Elliptic Integral Code Very Slow

2011-03-28 Thread achrzesz
If you mean complete elliptic integrals of the second kind then: sage: from scipy.special import ellipe sage: time pts=[ellipe(1.0/(1.0+0.01*k)) for k in range(1,101)] CPU times: user 0.01 s, sys: 0.00 s, total: 0.01 s Wall time: 0.02 s -- To post to this group, send email to sage-support@goog

[sage-support] Re: Elliptic Integral Code Very Slow

2011-03-28 Thread achrzesz
of course k in range(1,101) -- 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: http://www.sagemath.or

[sage-support] Re: Elliptic Integral Code Very Slow

2011-03-28 Thread achrzesz
sage: from scipy.special import ellipk sage: time pts=[ellipk(1.0/(1.0+0.01*k)) for k in srange(0,1,0.01)] CPU times: user 0.02 s, sys: 0.00 s, total: 0.02 s Wall time: 0.02 s -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sa

[sage-support] Re: Elliptic Integral Code Very Slow

2011-03-28 Thread kcrisman
> Am I doing something wrong here? I realise sage isn't a numerical > system, but this code appears to be quite slow. Oh, and just because this isn't one of its biggest strengths now doesn't mean we don't want it to be! We certainly have the potential, a lot is just wrapping functionality better

[sage-support] Re: Elliptic Integral Code Very Slow

2011-03-28 Thread kcrisman
sage: %time pts=[ elliptic_ec(m) for m in srange(0,1,0.01,include_endpoint=True)] CPU times: user 0.35 s, sys: 0.06 s, total: 0.41 s Wall time: 3.09 s What's interesting about this is that Wall time is much higher, also for you. That's starting Maxima, I think. But once you've started Maxima up,

[sage-support] Re: Elliptic Integral Code Very Slow

2011-03-28 Thread achrzesz
sage: %time pts=maxima('makelist(elliptic_ec(float(1/(1+0.01*k))),k, 1,100)') CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s Wall time: 0.05 s sage: pts0=[RR(x) for x in pts] On 28 Mar, 15:39, ObsessiveMathsFreak wrote: > > sage: %time pts=maxima('makelist(elliptic_ec(0.01*k),k,0,100)') > > s

[sage-support] Re: Elliptic Integral Code Very Slow

2011-03-28 Thread ObsessiveMathsFreak
> sage: %time pts=maxima('makelist(elliptic_ec(0.01*k),k,0,100)') > sage: pts0=map(n,pts) I'm not clear on what's happening here. I take it that the first call is bypassing overheads associated with multiple maxima calls. The second command does not work for me however. In any case, my current pr

[sage-support] Re: Elliptic Integral Code Very Slow

2011-03-28 Thread achrzesz
Conversion to sage list: sage: pts0=map(n,pts) -- 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: htt

[sage-support] Re: Elliptic Integral Code Very Slow

2011-03-28 Thread achrzesz
Oops sage: %time pts=maxima('makelist(elliptic_ec(0.01*k),k,0,100)') CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s Wall time: 0.05 s -- 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

[sage-support] Re: Elliptic Integral Code Very Slow

2011-03-28 Thread achrzesz
sage: %time maxima('makelist(elliptic_ec(0.1*k),k,0,10)') CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s Wall time: 0.01 s [%pi/2,1.530757636897764,1.489035058095852,1.445363064412665, 1.399392138897432,1.350643881047676,1.298428035046913, 1.241670567945823,1.178489924327839,1.104774732704073,1

Re: [sage-support] Arithmetic Progession syntax

2011-03-28 Thread Tim Joseph Dumol
Hi, Either sxrange or srange should do the trick :) sage: sxrange(0,1,0.1) sage: srange(0,1,0.1) [0.000, 0.100, 0.200, 0.300, 0.400, 0.500, 0.600, 0.700, 0.800, 0.900] sage: sr

[sage-support] Elliptic Integral Code Very Slow

2011-03-28 Thread ObsessiveMathsFreak
The standard code to compute elliptic integrals in sage appears to be _very_ slow numerically. To compute the complete elliptic integral on 100 points in the unit interval takes about 16 seconds for me. sage: %time pts=[ elliptic_ec(m) for m in srange(0,1,0.01,include_endpoint=True)] CPU times: us

[sage-support] Re: Arithmetic Progession syntax

2011-03-28 Thread Jason Grout
On 3/28/11 6:28 AM, ObsessiveMathsFreak wrote: This is a simple question, but I can't find anything in the documentation about it. I would like to declare a simple arithmetic sequence in sage. I use this a lot for discrete plots, etc. In octave, syntax such as [0:0.1:1] returns the sequence 0.0

Re: [sage-support] Re: Arithmetic Progession syntax

2011-03-28 Thread Mike Hansen
On Mon, Mar 28, 2011 at 1:57 PM, ObsessiveMathsFreak wrote: > Thank you. That is more or less what I was looking for. > > However, is there any shorthand way of getting srange to include the > final endpoint? While > srange(0,1.0,0.1,include_endpoint=True) > works, it is somewhat more verbose than

[sage-support] Re: Arithmetic Progession syntax

2011-03-28 Thread ObsessiveMathsFreak
Thank you. That is more or less what I was looking for. However, is there any shorthand way of getting srange to include the final endpoint? While srange(0,1.0,0.1,include_endpoint=True) works, it is somewhat more verbose than I am used to. On Mar 28, 12:45 pm, David Joyner wrote: > On Mon, Mar

[sage-support] Re: Plot order in Graphics() object

2011-03-28 Thread Jason Grout
On 3/27/11 9:48 AM, Jeroen Demeyer wrote: On 2011-03-25 11:28, Jason Grout wrote: You should be able to use the zorder parameter. If that doesn't work, it's a bug. That works indeed, but I didn't know about the existence of the zorder parameter (it doesn't seem to be documented in the obvious

Re: [sage-support] Arithmetic Progession syntax

2011-03-28 Thread David Joyner
On Mon, Mar 28, 2011 at 7:28 AM, ObsessiveMathsFreak wrote: > This is a simple question, but I can't find anything in the > documentation about it. > > I would like to declare a simple arithmetic sequence in sage. I use > this a lot for discrete plots, etc. In octave, syntax such as > [0:0.1:1] re

[sage-support] Arithmetic Progession syntax

2011-03-28 Thread ObsessiveMathsFreak
This is a simple question, but I can't find anything in the documentation about it. I would like to declare a simple arithmetic sequence in sage. I use this a lot for discrete plots, etc. In octave, syntax such as [0:0.1:1] returns the sequence 0.0 0.2 0.4 0.6 0.8 1.0 Is there such a sho

Re: [sage-support] accented characters

2011-03-28 Thread Laurent
Le 26/03/2011 10:53, clodemil a écrit : Hi All, Sage does not accept accented characters like: é è à give a syntax error. For more informations, you can read this one (in French): http://dl.afpy.org/pycon-fr-09/Comprendre_les_erreurs_unicode.pdf As native french speaker, it saved my live mor