def _intercept_idx(design_info):
 from patsy.desc import INTERCEPT
 from numpy import array
 return array([(INTERCEPT == i) for i in design_info.terms])

def _intercept_idx ( design_info ) : from patsy . desc import INTERCEPT from numpy import array return array ( [ ( INTERCEPT == i ) for i in design_info . terms ] )
returns boolean array index indicating which column holds the intercept .