[Edu-sig] beginner trouble, indexing starting w/"0"
Kirby Urner
pdx4d@teleport.com
Thu, 29 Jun 2000 19:22:45 -0700
>If this is truly the way Python is configured it seems to me
>that this could be an important stumbling block.
Hi Matthew --
Whereas in linear algebra texts matrices and vectors are
indexed as you describe, all the same matrix and vector
ops work fine if your origin for indexing is 0 instead
of 1.
In other math texts, initial terms in sequences, or initial
state variables, are zero-subscripted by convention. Certainly
sigma notation doesn't care where you start -- lots of times
you find i = 0 to N (just another parameter to deal with,
all in a day's work).
When it comes to math notations, you encounter lots of
arbitrary conventions at every turn -- nothing new with
Python. What's more important, for a computer language
especially, is reliable adherence to the rules at run
time, once they're globally defined at design time.
In sum, we should look at indexing as one of those cultural
variables that one simply learns about and comes to see as
relatively unimportant. Some eat with chopsticks, some use
a knife and fork. Ultimately, food is food, and eating is
eating. I think it's good to teach that there's not just
"one right way" to do these things.
Kirby