human
Can you provide a the Python program you requested given the following:
I am working on the file "Rapport.ipynb".
The first task is:
Nous appliquons ensuite à la matrice G les conditions de bords. Nous avons réutilisé le même principe que pour K.
Can you write Python program for it?
assistant
#Here is the Python program you requested.

class Frame_Buckling(Frame_Buckling2):
    def bc_apply_G(self,G,blocked_dof):
        for (dof) in enumerate(blocked_dof): 
            Gbc = G 
            Gbc[dof, :] = 0
            Gbc[:, dof] = 0
            Gbc[dof, dof] = 1
        return Gbc