[sage-support] Re: Trying to create a vector of rounded floats

2008-04-12 Thread Jason Grout
Carl Witty wrote: > On Apr 11, 7:40 pm, Jason Grout <[EMAIL PROTECTED]> wrote: >> Is making an _integer_ method in the RDF class the right method to write? > > Yes, that will work. > >> Also, round(RR(3.0)) returns an Integer...should RDF behave the same >> way? (currently round(RDF(3.0)) return

[sage-support] Re: Trying to create a vector of rounded floats

2008-04-11 Thread Carl Witty
On Apr 11, 7:40 pm, Jason Grout <[EMAIL PROTECTED]> wrote: > Is making an _integer_ method in the RDF class the right method to write? Yes, that will work. > Also, round(RR(3.0)) returns an Integer...should RDF behave the same > way? (currently round(RDF(3.0)) returns an RDF). We recently chang

[sage-support] Re: Trying to create a vector of rounded floats

2008-04-11 Thread Jason Grout
William Stein wrote: > On Fri, Apr 11, 2008 at 3:49 PM, Jason Grout > <[EMAIL PROTECTED]> wrote: >> William Stein wrote: >> > On Fri, Apr 11, 2008 at 10:43 AM, Ryan Hinton <[EMAIL PROTECTED]> wrote: >> >> Sorry, I meant to. One problem is that the Sage pre-parsing results >> >> in different

[sage-support] Re: Trying to create a vector of rounded floats

2008-04-11 Thread William Stein
On Fri, Apr 11, 2008 at 3:49 PM, Jason Grout <[EMAIL PROTECTED]> wrote: > > William Stein wrote: > > On Fri, Apr 11, 2008 at 10:43 AM, Ryan Hinton <[EMAIL PROTECTED]> wrote: > >> Sorry, I meant to. One problem is that the Sage pre-parsing results > >> in different behavior than I am seeing,

[sage-support] Re: Trying to create a vector of rounded floats

2008-04-11 Thread Jason Grout
William Stein wrote: > On Fri, Apr 11, 2008 at 10:43 AM, Ryan Hinton <[EMAIL PROTECTED]> wrote: >> Sorry, I meant to. One problem is that the Sage pre-parsing results >> in different behavior than I am seeing, so pasting code into a Sage >> session will not exhibit the problem I am seeing. >

[sage-support] Re: Trying to create a vector of rounded floats

2008-04-11 Thread Lars Fischer
Hello Ryan, are you looking for map? map(function, sequence[, sequence, ...]) -> list Return a list of the results of applying the function to the items of the argument sequence(s). If more than one sequence is given, the function is called with an argument list consisting of the c

[sage-support] Re: Trying to create a vector of rounded floats

2008-04-11 Thread William Stein
On Fri, Apr 11, 2008 at 10:43 AM, Ryan Hinton <[EMAIL PROTECTED]> wrote: > > Sorry, I meant to. One problem is that the Sage pre-parsing results > in different behavior than I am seeing, so pasting code into a Sage > session will not exhibit the problem I am seeing. Include sage: preparse(Fa

[sage-support] Re: Trying to create a vector of rounded floats

2008-04-11 Thread Ryan Hinton
Sorry, I meant to. One problem is that the Sage pre-parsing results in different behavior than I am seeing, so pasting code into a Sage session will not exhibit the problem I am seeing. Let me see if I can cajole Sage into giving similar behavior from the prompt. sage: import __builtin__ sage:

[sage-support] Re: Trying to create a vector of rounded floats

2008-04-11 Thread William Stein
On Fri, Apr 11, 2008 at 9:58 AM, Ryan Hinton <[EMAIL PROTECTED]> wrote: > > There must be an easier way to do this. In a Python class I have a list > of RealNumber elements, "fracs_list". I want to multiply them by a > common scalar "length" and round them to get a vector of integers. I > h