I am trying to implement reflecting boundary conditions of
$ \begin{align} \psi_N \equiv \psi_{N-1}, \end{align} $
$ \begin{align} \psi_{-1} \equiv \psi_0, \end{align} $
to the hamiltonian matrix and then trying to find the 101 lowest energy eigen values. I am using a dimensionless schroedinger equation so $\hbar = 1$ and $m = \frac{1}{2}$ and also the potential $V = 0$. How can I implement the boundary conditions to the square matrix? Here is the matrix and eigenvalue and eigenvector calculation without boundary conditions:
H = (dx**-2)*diags([-1, 2, -1], [-1, 0, 1], shape=(N, N))
eigval, eigvec = eigsh(H, 101, which="SM")
If there is any ambiguity in my question please let me know so I can make it clearer