statsmodels.tools.tools.fullrank

statsmodels.tools.tools.fullrank(x, r=None)[source]

Return an array whose column span is the same as x.

Parameters:
xndarray

The array to adjust, 2d.

rint, optional

The rank of x. If not provided, determined by np.linalg.matrix_rank.

Returns:
ndarray

The array adjusted to have full rank.

Notes

If the rank of x is known it can be specified as r – no check is made to ensure that this really is the rank of x.