Direct Stiffness Method in Python