In 3.3.alpha0, the following works fine:

sage: list= [[i,j] for i in [-3..3] for j in [-3..3]]
sage: [coords for coords in list if (coords[0])^2+(coords[1])^2-1==0]
[[-1, 0], [0, -1], [0, 1], [1, 0]]

The following doesn't terminate in a reasonable amount of time:

sage: f(x,y)=x^2+y^2-1
sage: list= [[i,j] for i in [-3..3] for j in [-3..3]]
sage: [coords for coords in list if f(coords[0],coords[1])==0]

In the notebook I can't even interrupt it; I have to restart the
worksheet, so maybe there's some horrible recursion going on, but ...
I mean, there are only 49 points to check ... right?  What am I doing
wrong in using a function this way?

Thanks,
- kcrisman
--~--~---------~--~----~------------~-------~--~----~
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
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to