Adding the transpose of a square matrix to that matrix should produce a matrix that is symmetric around the diagonal. For example:
import numpy as np
W1 = np.random.random((90, 90))
W1 += np.transpose(W1)
(np.transpose(W1) == W1).all()
True
But this behaviour seems to break down in larger matrices:
W2 = np.random.random((91, 91))
W2 += np.transpose(W2)
(np.transpose(W2) == W2).all()
False
The differences are not trivial:
print( np.max(W2), np.max(W2-np.transpose(W2)), np.min(W2-np.transpose(W2)))
2.84604132441 0.987790051685 -0.987790051685
Is this a deficit of numpy or am I missing something?