[sage-support] Re: Counting complex number in a Tuples

2008-05-09 Thread Rose
> How about something like the following: > > cpoints = [0, 1, 1+I] > points = [[real(z), imag(z)] for z in cpoints] > polygon(points).show(figsize=[8,8]) > > Mark Thank you, this is what I was trying to do! --~--~-~--~~~---~--~~ To post to this group, send email

[sage-support] Re: Counting complex number in a Tuples

2008-05-09 Thread mark mcclure
On May 9, 4:16 pm, Rose <[EMAIL PROTECTED]> wrote: > No I am not sure I need Tuple(). I am trying to draw some polygons on > the complex plane, so I put the coordinates of the vertex (I am not > sure it is the good word) in a Turple(). > Do you think there is a better way to do that? How about so

[sage-support] Re: Counting complex number in a Tuples

2008-05-09 Thread Rose
On 9 mai, 15:01, "John Cremona" <[EMAIL PROTECTED]> wrote: > Are you sure that you need Tuple() at all for what you are doing? No I am not sure I need Tuple(). I am trying to draw some polygons on the complex plane, so I put the coordinates of the vertex (I am not sure it is the good word) in a

[sage-support] Re: Counting complex number in a Tuples

2008-05-09 Thread Rose
> So I'm guessing you're using symbolic numbers instead of complex > numbers. It's easy to get them wrong: I was doing that mistake. Thank you, it is going faster now. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsu

[sage-support] Re: Counting complex number in a Tuples

2008-05-09 Thread didier deshommes
On Fri, May 9, 2008 at 3:12 PM, John Cremona <[EMAIL PROTECTED]> wrote: > > Didier, I am sure you are right but I thought it best to deal with one > matter at a time! From Rose's posting it looked as if she was just > trying to count instances in a list, while Tuples is a much more > complicated

[sage-support] Re: Counting complex number in a Tuples

2008-05-09 Thread John Cremona
Didier, I am sure you are right but I thought it best to deal with one matter at a time! From Rose's posting it looked as if she was just trying to count instances in a list, while Tuples is a much more complicated function. John 2008/5/9 didier deshommes <[EMAIL PROTECTED]>: > > On Fri, May 9,

[sage-support] Re: Counting complex number in a Tuples

2008-05-09 Thread didier deshommes
On Fri, May 9, 2008 at 1:59 PM, Rose <[EMAIL PROTECTED]> wrote: Hi Rose, > > Second, it becomes pretty long went there are complex numbers in my > Tuples (more than 30 secondes for 7 elements). This does take time, interestingly when the numbers are symbolic: {{{ sage: f=range(6) sage: %time T

[sage-support] Re: Counting complex number in a Tuples

2008-05-09 Thread John Cremona
Are you sure that you need Tuple() at all for what you are doing? Try looking at the documentaion for it with Tuples? If all you want to do is count the number of times an element appears in a list, use the count() function which every lisy has, like this sage: u=[1+I,1+I,1+I,2+I,2+I,2+I,2+I] s