def contrast_all_one(nm):
 contr = np.column_stack((np.ones((nm - 1)), (- np.eye((nm - 1)))))
 return contr

def contrast_all_one ( nm ) : contr = np . column_stack ( ( np . ones ( ( nm - 1 ) ) , ( - np . eye ( ( nm - 1 ) ) ) ) ) return contr
contrast or restriction matrix for all against first comparison parameters nm : int returns contr : ndarray .