Hi,
I recently updated my MDAnalysis version from 1.0.0 to 2.0.0 but suddenly found that there is a numpy error when I run the code for visualising my principal components (I never had this issue with version 1.0.0). Here is the code I'm trying to run:
# generate the projected coordinates of the first principal component
# The mean positions are stored at pc.mean
pc1= pc.p_components[:, 0]
trans1 = transformed[:, 0]
projected = np.outer(trans1, pc1) + pc.mean
coordinates = projected.reshape(len(trans1), -1, 3)
And here is the error:
"ValueError Traceback (most recent call last)
<ipython-input-9-bd9fa4c6219f> in <module>
3 pc1= pc.p_components[:, 0] 4
4 trans1 = transformed[:, 0]
----> 5 projected = np.outer(trans1, pc1) + pc.mean 6
6 coordinates = projected.reshape(len(trans1), -1, 3)
ValueError: operands could not be broadcast together with shapes (44,4290) (1430,3)"
Not sure why suddenly numpy is complaining with the new version? Thanks for your help.
Best wishes,
Angela