set the coo_matrix diagonal without requiring a new version of scipy