def _lin_field_coeff(surf, mult, rmags, cosmags, ws, bins, n_jobs):
 (parallel, p_fun, _) = parallel_func(_do_lin_field_coeff, n_jobs)
 nas = np.array_split
 coeffs = parallel((p_fun(surf['rr'], t, tn, ta, rmags, cosmags, ws, bins) for (t, tn, ta) in zip(nas(surf['tris'], n_jobs), nas(surf['tri_nn'], n_jobs), nas(surf['tri_area'], n_jobs))))
 return (mult * np.sum(coeffs, axis=0))

def _lin_field_coeff ( surf , mult , rmags , cosmags , ws , bins , n_jobs ) : ( parallel , p_fun , _ ) = parallel_func ( _do_lin_field_coeff , n_jobs ) nas = np . array_split coeffs = parallel ( ( p_fun ( surf [ 'rr' ] , t , tn , ta , rmags , cosmags , ws , bins ) for ( t , tn , ta ) in zip ( nas ( surf [ 'tris' ] , n_jobs ) , nas ( surf [ 'tri_nn' ] , n_jobs ) , nas ( surf [ 'tri_area' ] , n_jobs ) ) ) ) return ( mult * np . sum ( coeffs , axis = 0 ) )
parallel wrapper for _do_lin_field_coeff to compute linear coefficients .