code: def _van_der_corput_samples(idx, number_base=2):
      """Create `Van Der Corput` low discrepancy sequence samples.
  
      A van der Corput sequence is an example of the simplest one-dimensional
      low-discrepancy sequence over the unit interval; it was first described in
      1935 by the Dutch mathematician J. G. van der Corput. It is constructed by
      reversing the base-n representation of the sequence of natural numbers
      (1, 2, 3, ...).
  
      In practice, use Halton sequence instead of Van Der Corput, as it is the
      same, but generalized to work in multiple dimensions.
  
      Parameters
      ----------
      idx (int, numpy.ndarray):
          The index of the sequence. If array is provided, all values in
          array is returned.
      number_base : int
          The numerical base from where to create the samples from.
  
      Returns
      -------
      float, numpy.ndarray
          Van der Corput samples.
  
      """
      assert number_base > 1
  
      idx = np.asarray(idx).flatten()
      out = np.zeros(len(idx), dtype=float)
  
      base = float(number_base)
      active = np.ones(len(idx), dtype=bool)
      while np.any(active):
          out[active] += (idx[active] % number_base) / base
          idx //= number_base
          base *= number_base
          active = idx > 0
      return out
  
file_path: scikit-optimize/skopt/sampler/halton.py
imports: import numpy
  from .base import InitialPointGenerator
  from ..space import Space
  from sklearn.utils import check_random_state
label_desc: Use image node_id 1 for calling a global function with example usage: _van_der_corput_samples(idx, number_base) and returns: out