def diagonal(self):
<EOL>fn = getattr(_sparsetools, self.format + "<STR_LIT>")<EOL>y = np.empty(min(self.shape), dtype=upcast(self.dtype))<EOL>fn(self.shape[<NUM_LIT:0>], self.shape[<NUM_LIT:1>], self.indptr, self.indices, self.data, y)<EOL>return y<EOL>
Returns the main diagonal of the matrix