On 29.07.2011, at 1:19AM, Stéfan van der Walt wrote: > On Thu, Jul 28, 2011 at 4:10 PM, Anne Archibald > <aarch...@physics.mcgill.ca> wrote: >> Don't forget the everything-looks-like-a-nail approach: make all your >> arrays one bigger than you need and ignore element zero. > > Hehe, why didn't I think of that :) > > I guess the kind of problem I struggle with more frequently is books > written with summations over -m to +n. In those cases, it's often > convenient to use the mapping function, so that I can enter the > formulas as they occur.
I don't want to open any cans of worms at this point, but given that Fortran90 supports such indexing (arbitrary limits, including negative ones), there definitely are use cases for it (or rather, instances where it is very convenient at least, like in Stéfan's books). So I am wondering how much it would take to implement such an enhancement for the standard ndarray... Cheers, Derek _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion