[Tutor] Numpy documentation

Roger Lea Scherer rls4jc at gmail.com
Thu Oct 4 15:02:01 EDT 2018


I truly don't think I'm this stupid, but I can't even understand the fourth
paragraph of the numpy documentation.
https://docs.scipy.org/doc/numpy/user/quickstart.html says:

 In the example pictured below, the array has 2 axes. The first axis has a
length of 2, the second axis has a length of 3.
[[ 1., 0., 0.],
 [ 0., 1., 2.]]

(I think) I understand the 2 axes. [1,0,0] (I'm lazy and don't want to type
the periods) is one axis and [0,1,2] is the second axis. But then things
get goofy. The first axis has a length of 2. Is that because [1,0,0] and
[0,1,2] are counted as one axis? (I think) I understand the second axis has
a length of 3 because there are 3 elements within the [0,1,2] axis. Is that
correct? But why does the first axis have a length of 2? Because the second
zero doesn't count? Did they change the example and forgot to change the
text?

Thank you for your help as always.


-- 
Roger Lea Scherer
623.255.7719

                  *Strengths:*
   Input, Strategic,
Responsibility,

Learner, Ideation


More information about the Tutor mailing list