rsokl / Learning_Python

Source material for Python Like You Mean it
https://www.pythonlikeyoumeanit.com/
Other
165 stars 54 forks source link

Error in section "Introducing the ND-array" #126

Closed apezzotti86 closed 4 years ago

apezzotti86 commented 4 years ago

There is an error in the below text. Taking mean value over three distinct columns should use axis = 0. If you manually compute the averages, axis = 1 takes the average over rows.

Let’s take the mean value over the three distinct columns in our data:

np.mean(x, axis=1) array([ 1., 4., 7.])

rsokl commented 4 years ago

Thank you for reporting this! This is now fixed (2a81ef999e6b16c991d87618aa5096ad6b35eb4a).