[Numpy-discussion] Can I index array starting with 1?

Stéfan van der Walt stefan at sun.ac.za
Thu Jul 28 19:19:18 EDT 2011


On Thu, Jul 28, 2011 at 4:10 PM, Anne Archibald
<aarchiba at 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.

Stéfan



More information about the NumPy-Discussion mailing list