File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -337,9 +337,11 @@ but `data[0, 0]` might.
337337Programming languages like Fortran and MATLAB start counting at 1,
338338because that's what human beings have done for thousands of years.
339339Languages in the C family (including C++, Java, Perl, and Python) count from 0
340- because that's more convenient when indices are computed rather than constant
341- (see [Mike Hoye's blog post](http://exple.tive.org/blarg/2013/10/22/citation-needed/)
342- for historical details).
340+ because it represents an offset from the first value in the array (the second
341+ value is offset by one index from the first value). This is closer to the way
342+ that computers represent arrays (if you are interested in the historical
343+ reasons behind counting indices from zero, you can read
344+ [Mike Hoye's blog post](http://exple.tive.org/blarg/2013/10/22/citation-needed/)).
343345As a result,
344346if we have an M×N array in Python,
345347its indices go from 0 to M-1 on the first axis
You can’t perform that action at this time.
0 commit comments