- #1
ver_mathstats
- 260
- 21
- Homework Statement
- Assume that a is a 2-dimensional NumPy array. Subtract the mean from each column of a.
- Relevant Equations
- Python
Python:
import numpy as np
a=np.array([[1,2,3], [4,5,6]])
print(s)
print()
print(a.mean())
I know how to take the mean of the entire array. However I am having trouble understanding what it means to subtract the mean from each column. Does this mean subtract it from each element in the column? Thank you.