parameters: (particles, weights)
return_statement: return mean, var
docstring: returns mean and variance of the weighted particles
docstring_summary: returns mean and variance of the weighted particles
docstring_tokens: returns mean and variance of the weighted particles
function: def estimate(particles, weights):
      """returns mean and variance of the weighted particles"""
  
      pos = particles[:, 0:2]
      mean = np.average(pos, weights=weights, axis=0)
      var  = np.average((pos - mean)**2, weights=weights, axis=0)
      return mean, var
function_tokens: def estimate ( particles , weights ) : pos = particles [ : , 0 : 2 ] mean = np . average ( pos , weights = weights , axis = 0 ) var = np . average ( ( pos - mean ) ** 2 , weights = weights , axis = 0 ) return mean , var