This is too complex for autopep8 to handle well. Try

``` python
    lap = sparse.coo_matrix(
        (np.hstack((data, connect)),
         (np.hstack((i_indices, diag)), np.hstack((j_indices, diag)))), 
        shape=(pixel_nb, pixel_nb))
```