fix and test returning of diagonal attribute
complain when trying to fetch diagonal of non square matrix