def S_crosssection(x, group):
 x_group_sums = group_sums(x, group).T
 return S_white_simple(x_group_sums)

def S_crosssection ( x , group ) : x_group_sums = group_sums ( x , group ) . T return S_white_simple ( x_group_sums )
inner covariance matrix for white on group sums sandwich i guess for a single categorical group only .