William Stein wrote: > On 9/19/07, Jaap Spies <[EMAIL PROTECTED]> wrote: >> William, >> >> After the discussion in the thread 'Calculus' I added the function >> irange(start, stop, step=1) to misc/misc.py. >> >> I think this could be a good replacement of the operator '..' >> known in Maple and Matlab. Better since it allows steps to be >> different from 1. > > There is a already a function srange in misc.py like this: > > def srange(a,b=None,step=1, include_endpoint=False): >
See above and below! Yes I know, but irange would appeal more to users of Maple and Matlab. > What does your irange do differently? And why the i? > Does it mean "include" endpoints? That makes sense > actually. > See the documentation that goes with the function! Yes indeed, include endpoints. Did you read the comment? > I would like to see a version in Cython that is blazingly fast, > so I'm cc'ing this to sage-devel for feedback. > >> The Maple expression: seq(n^2, n=-1..10) has an equivalent >> sage: [n^2 for n in irange(-1, 10)] >> [1, 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100] >> >> Maybe we can think of a better name. > > It's better than any I thought of so far. > Jaap --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---
irange.hg
Description: Binary data
