orthogonal_sampling

modcma.sampling.orthogonal_sampling(sampler: Generator, n_samples: int) → Generator[numpy.ndarray, None, None]

Generator yielding orthogonal samples.

This function orthogonalizes <n_samples>, and succesively yields each of them. It uses the linalg.qr decomposition function of the numpy library.

Parameters
  • sampler (generator) – A sample generator yielding numpy.ndarray

  • n_samples (int) – An integer indicating the number of sample to be orthogonalized.

Yields

numpy.ndarray