code: def sample(self, n=1):
          
          cumsum_weights = np.cumsum(self.particle_weights)
          return self.particle_locations[np.minimum(cumsum_weights.searchsorted(
              np.random.random((n,)),
              side='right'
          ), len(cumsum_weights) - 1)]
docs: Returns random samples from the current particle distribution according
          to particle weights.
  
          :param int n: The number of samples to draw.
          :return: The sampled model parameter vectors.
          :rtype: `~numpy.ndarray` of shape ``(n, updater.n_rvs)``.