def _do_self_dots_subset(intrad, rmags, rlens, cosmags, ws, volume, lut, n_fact, ch_type, idx):
 products = np.zeros((len(rmags), len(rmags)))
 for ci1 in idx:
  ci2 = (ci1 + 1)
  res = _fast_sphere_dot_r0(intrad, rmags[ci1], rmags[:ci2], rlens[ci1], rlens[:ci2], cosmags[ci1], cosmags[:ci2], ws[ci1], ws[:ci2], volume, lut, n_fact, ch_type)
  products[ci1, :ci2] = res
  products[:ci2, ci1] = res
 return products

def _do_self_dots_subset ( intrad , rmags , rlens , cosmags , ws , volume , lut , n_fact , ch_type , idx ) : products = np . zeros ( ( len ( rmags ) , len ( rmags ) ) ) for ci1 in idx : ci2 = ( ci1 + 1 ) res = _fast_sphere_dot_r0 ( intrad , rmags [ ci1 ] , rmags [ : ci2 ] , rlens [ ci1 ] , rlens [ : ci2 ] , cosmags [ ci1 ] , cosmags [ : ci2 ] , ws [ ci1 ] , ws [ : ci2 ] , volume , lut , n_fact , ch_type ) products [ ci1 , : ci2 ] = res products [ : ci2 , ci1 ] = res return products
helper for parallelization .