completed the function 'diagonal' and added tests
changed the doc for diagonal slightly, no major update
Merge pull request #109 from prasant94/develop

Completed the diagonal function and added tests.