sparse_mean function

Calculate mean from sparse vectors