[Numpy-discussion] one-offset arrays

Eric Nodwell nodwell at physics.ubc.ca
Tue Aug 28 19:24:22 EDT 2001


Does anyone have a simple method of using one-offset arrays?
Specifically, can I define an array "a" so that a[1] refers to the
first element?

Without one-offset indexing, it seems to me that Python is minimally
useful for numerical computations. Many, perhaps the majority, of
numerical algorithms are one-indexed. Matlab for example is one-based
for this reason.  In fact it seems strange to me that a "high-level"
language like Python should use zero-offset lists.







More information about the NumPy-Discussion mailing list