ndarray implementation of main-diagonal fixed
Merge pull request #157 from Gerrrr/fix/ndarray_main_diagonal

ndarray implementation of main-diagonal fixed