Selfloops counted twice

Fix bug where Graph selfloops get counted twice when converting to scipy sparse matrix.

Fixes #1075