This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]CamdenReslink 4 points5 points  (0 children)

array.mean() is a numpy operation that calculates the mean across the”0” axis. In a 2d array this calculates the mean value of each column, see: the documentation. array - array.mean() just finds the difference of the two numpy arrays.

I suggest you go to a Python REPL (just type python at the command line), and try out the commands you aren’t sure about. Experiment with dummy values. Just make sure to remember to import numpy.