Rotation of a vector in Python