def simplex_averaging_matrix(simplices, weight=None, inverse=False):
m = simplex_summation_matrix(simplices, weight=weight, inverse=inverse)<EOL>rs = np.asarray(m.sum(axis=<NUM_LIT:1>), dtype=np.float)[:,<NUM_LIT:0>]<EOL>invrs = zinv(rs)<EOL>rng = range(m.shape[<NUM_LIT:0>])<EOL>diag = sps.csr_matrix((invrs, (rng, rng)), dtype=np.float)<EOL>return diag.dot(sps.csc_matrix(m, dtype=np.float))<EOL>
Simplex_averaging_matrix(mtx) is equivalent to simplex_simmation_matrix, except that each row of
  the matrix is subsequently normalized such that all rows sum to 1.

The optional argument inverse=True may be passed to indicate that the inverse averaging matrix
(of vertices onto simplices) should be returned.