Write in Python a function \texttt{modifie\_matrice(p, A)} that takes as arguments a probability $p$ and a numpy array representing a matrix $A \in \mathcal { V } _ { n , n }$. This function modifies the array A according to the following procedure: for every natural integer $k$, the matrix $A _ { k + 1 }$ is constructed from the matrix $A _ { k }$ by keeping each coefficient of $A _ { k }$ equal to $-1$ and by changing to $-1$ with probability $p$ each coefficient of $A _ { k }$ equal to $1$.
Write in Python a function \texttt{modifie\_matrice(p, A)} that takes as arguments a probability $p$ and a numpy array representing a matrix $A \in \mathcal { V } _ { n , n }$. This function modifies the array A according to the following procedure: for every natural integer $k$, the matrix $A _ { k + 1 }$ is constructed from the matrix $A _ { k }$ by keeping each coefficient of $A _ { k }$ equal to $-1$ and by changing to $-1$ with probability $p$ each coefficient of $A _ { k }$ equal to $1$.