'diag_dict is a defaultdict containing
all the entries of the diagonal matrix.'

@classmethod
def _eval_diag(cls, rows, cols, diag_dict):

    def entry(i, j):
        return diag_dict[(i, j)]
    return cls._new(rows, cols, entry)
