def _shift_intercept(arr):
 arr = np.asarray(arr)
 side = int(np.sqrt(len(arr)))
 return np.roll(np.roll(arr.reshape(side, side), (-1), axis=1), (-1), axis=0)

def _shift_intercept ( arr ) : arr = np . asarray ( arr ) side = int ( np . sqrt ( len ( arr ) ) ) return np . roll ( np . roll ( arr . reshape ( side , side ) , ( - 1 ) , axis = 1 ) , ( - 1 ) , axis = 0 )
a convenience function to make the sas covariance matrix compatible with statsmodels .