I was trying to perform mean clustering on my dataset. The dataset X is of the dimension (182,108,130). The mean is calculated using np.mean(X, axis = 1). The mean is of dimension (182,130). Now I'd like to subtract the mean from the dataset. How do I achieve it without a for loop?
I have tried to directly subtract X - mean but returned error
`operands could not be broadcast together with shapes (182,108,130) (130,182) `
I'd expect the mean being subtracted in each block.