return itertools.izip(coo_matrix.row, coo_matrix.col, coo_matrix.data)

改为

return zip(coo_matrix.row, coo_matrix.col, coo_matrix.data)