original_docstring: Samples for each coordinate using a Gaussian Mixture.
  
          This is generally to slow for most applications. TODO C++/Numpy reimplementation.
          
docstring: Samples for each coordinate using a Gaussian Mixture.
  This is generally to slow for most applications. TODO C++/Numpy reimplementation.
docstring_tokens: Samples for each coordinate using a Gaussian Mixture . This is generally to slow for most applications . TODO C ++ / Numpy reimplementation .
code: def sample_from(self, coordinates):
          """Samples for each coordinate using a Gaussian Mixture.
  
          This is generally to slow for most applications. TODO C++/Numpy reimplementation.
          """
          pos_coords, pos = self.generator.get_closest_position(coordinates)
          samples = np.empty(pos_coords.shape, dtype=float)
          for i, p in enumerate(pos_coords):
              weights, means, covs = self[p]
              selection = np.random.choice(np.arange(len(weights)), p=weights)
              samples[i] = multivariate_normal.rvs(
                  mean=means[selection] + pos[i], cov=covs[selection]
              )
          return samples
code_tokens: def sample_from ( self , coordinates ) : pos_coords , pos = self . generator . get_closest_position ( coordinates ) samples = np . empty ( pos_coords . shape , dtype = float ) for i , p in enumerate ( pos_coords ) : weights , means , covs = self [ p ] selection = np . random . choice ( np . arange ( len ( weights ) ) , p = weights ) samples [ i ] = multivariate_normal . rvs ( mean = means [ selection ] + pos [ i ] , cov = covs [ selection ] ) return samples
short_docstring: Samples for each coordinate using a Gaussian Mixture.
short_docstring_tokens: Samples for each coordinate using a Gaussian Mixture .
comment: """Samples for each coordinate using a Gaussian Mixture.
  
          This is generally to slow for most applications. TODO C++/Numpy reimplementation.
          """