Python "why" questions
Roy Smith
roy at panix.com
Tue Aug 17 23:55:35 CEST 2010
In article <4c6a8cff$1 at dnews.tpgi.com.au>,
Lie Ryan <lie.1296 at gmail.com> wrote:
> On 08/16/10 21:54, David Cournapeau wrote:
> > On Mon, Aug 16, 2010 at 9:53 AM, Gregory Ewing
> > <greg.ewing at canterbury.ac.nz> wrote:
> >>> On Aug 7, 2010, at 9:14 PM, John Nagle wrote:
> >>>
> >>>> The languages which have real multidimensional arrays, rather
> >>>> than arrays of arrays, tend to use 1-based subscripts. That
> >>>> reflects standard practice in mathematics.
> >>
> >> Not always -- mathematicians use whatever starting index is
> >> most convenient for the problem at hand.
> >
> > Yes, there are many engineering fields where index starts at 0. Partly
> > for the reason you have stated concerning polynomials, especially
> > since this extend to series, which are pervasive in numerical
> > computing. In linear algebra, though, I remember to have always noted
> > matrices indexes in the [1,n] range, not [0,n-1].
>
> I'm sure some would prefer to denote it as [0, n)
Only if there's an emacs mode which can do the parenthesis matching
correctly ;-)
More information about the Python-list
mailing list