e
    square diagonal matrix with `diag` on its main diagonal.

    Parameters
    ----------
    diag : 1d array-like
        See above
    root : 2d array-like
        See above

    Notes
    -----
    The matrix is represented internally in the form Diag^{1/2}(I +
    factor * scales * factor')Diag^{1/2}, where `Diag` and `scales`
    are diagonal matrices, and `factor` is an orthogonal matrix.
    c