'Trace of the smoothing matrix S(pen)
TODO: addin a reference to Wahba, and whoever else I used.'

def trace(self):

    if (self.pen > 0):
        _invband = _hbspline.invband(self.chol.copy())
        tr = _trace_symbanded(_invband, self.btb, lower=1)
        return tr
    else:
        return self.rank
