def _get_contrast_indices(effect_idx, n_factors):
 binrepr = np.binary_repr(effect_idx, n_factors)
 return np.array([int(i) for i in binrepr], dtype=int)

def _get_contrast_indices ( effect_idx , n_factors ) : binrepr = np . binary_repr ( effect_idx , n_factors ) return np . array ( [ int ( i ) for i in binrepr ] , dtype = int )
hensons factor coding .