# scipy 1.18.1 (BSD-3-Clause), harvested by tools/harvest_corpus.py
=== input
Update the centered discrepancy with a new sample.

    Parameters
    ----------
    x_new : array_like (1, d)
        The new sample to add in `sample`.
    sample : array_like (n, d)
        The initial sample.
    initial_disc : float
        Centered discrepancy of the `sample`.

    Returns
    -------
    discrepancy : float
        Centered discrepancy of the sample composed of `x_new` and `sample`.

    Examples
    --------
    We can also compute iteratively the discrepancy by using
    ``iterative=True``.

    >>> import numpy as np
    >>> from scipy.stats import qmc
    >>> space = np.array([[1, 3], [2, 6], [3, 2], [4, 5], [5, 1], [6, 4]])
    >>> l_bounds = [0.5, 0.5]
    >>> u_bounds = [6.5, 6.5]
    >>> space = qmc.scale(space, l_bounds, u_bounds, reverse=True)
    >>> disc_init = qmc.discrepancy(space[:-1], iterative=True)
    >>> disc_init
    0.04769081147119336
    >>> qmc.update_discrepancy(space[-1], space[:-1], disc_init)
    0.008142039609053513

    
=== parse numpydoc
short_description: 'Update the centered discrepancy with a new sample.'
blank_after_short_description: True
blank_after_long_description: False
style: numpydoc
- DocstringParam
  description: 'The new sample to add in `sample`.'
  kind: param
  key: 'param'
  arg_name: 'x_new'
  type_name: 'array_like (1, d)'
  is_optional: False
- DocstringParam
  description: 'The initial sample.'
  kind: param
  key: 'param'
  arg_name: 'sample'
  type_name: 'array_like (n, d)'
  is_optional: False
- DocstringParam
  description: 'Centered discrepancy of the `sample`.'
  kind: param
  key: 'param'
  arg_name: 'initial_disc'
  type_name: 'float'
  is_optional: False
- DocstringReturns
  description: 'Centered discrepancy of the sample composed of `x_new` and `sample`.'
  kind: returns
  key: 'returns'
  type_name: 'float'
  is_generator: False
  return_name: 'discrepancy'
- DocstringExample
  description: |
    We can also compute iteratively the discrepancy by using
    ``iterative=True``.
  kind: examples
  key: 'examples'
  snippet: '>>> import numpy as np'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: '>>> from scipy.stats import qmc'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: '>>> space = np.array([[1, 3], [2, 6], [3, 2], [4, 5], [5, 1], [6, 4]])'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: '>>> l_bounds = [0.5, 0.5]'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: '>>> u_bounds = [6.5, 6.5]'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: '>>> space = qmc.scale(space, l_bounds, u_bounds, reverse=True)'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: '>>> disc_init = qmc.discrepancy(space[:-1], iterative=True)'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: |
    >>> disc_init
    0.04769081147119336
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: |
    >>> qmc.update_discrepancy(space[-1], space[:-1], disc_init)
    0.008142039609053513
=== detect
numpydoc
=== compose numpydoc
Update the centered discrepancy with a new sample.

Parameters
----------
x_new : array_like (1, d)
    The new sample to add in `sample`.
sample : array_like (n, d)
    The initial sample.
initial_disc : float
    Centered discrepancy of the `sample`.

Returns
-------
discrepancy : float
    Centered discrepancy of the sample composed of `x_new` and `sample`.

Examples
--------
We can also compute iteratively the discrepancy by using
``iterative=True``.

>>> import numpy as np
>>> from scipy.stats import qmc
>>> space = np.array([[1, 3], [2, 6], [3, 2], [4, 5], [5, 1], [6, 4]])
>>> l_bounds = [0.5, 0.5]
>>> u_bounds = [6.5, 6.5]
>>> space = qmc.scale(space, l_bounds, u_bounds, reverse=True)
>>> disc_init = qmc.discrepancy(space[:-1], iterative=True)
>>> disc_init
0.04769081147119336
>>> qmc.update_discrepancy(space[-1], space[:-1], disc_init)
0.008142039609053513
