# scipy 1.18.1 (BSD-3-Clause), harvested by tools/harvest_corpus.py
=== input

    Calculate the standard deviation of the values of an N-D image array,
    optionally at specified sub-regions.

    Parameters
    ----------
    input : array_like
        N-D image data to process.
    labels : array_like, optional
        Labels to identify sub-regions in `input`.
        If not None, must be same shape as `input`.
    index : int or sequence of ints, optional
        `labels` to include in output. If None (default), all values where
        `labels` is non-zero are used.

    Returns
    -------
    standard_deviation : float or ndarray
        Values of standard deviation, for each sub-region if `labels` and
        `index` are specified.

    See Also
    --------
    label, variance, maximum, minimum, extrema

    Examples
    --------
    >>> import numpy as np
    >>> a = np.array([[1, 2, 0, 0],
    ...               [5, 3, 0, 4],
    ...               [0, 0, 0, 7],
    ...               [9, 3, 0, 0]])
    >>> from scipy import ndimage
    >>> ndimage.standard_deviation(a)
    2.7585095613392387

    Features to process can be specified using `labels` and `index`:

    >>> lbl, nlbl = ndimage.label(a)
    >>> ndimage.standard_deviation(a, lbl, index=np.arange(1, nlbl+1))
    array([ 1.479,  1.5  ,  3.   ])

    If no index is given, non-zero `labels` are processed:

    >>> ndimage.standard_deviation(a, lbl)
    2.4874685927665499

    
=== parse numpydoc
short_description: |
  Calculate the standard deviation of the values of an N-D image array,
  optionally at specified sub-regions.
blank_after_short_description: True
blank_after_long_description: False
style: numpydoc
- DocstringParam
  description: 'N-D image data to process.'
  kind: param
  key: 'param'
  arg_name: 'input'
  type_name: 'array_like'
  is_optional: False
- DocstringParam
  description: |
    Labels to identify sub-regions in `input`.
    If not None, must be same shape as `input`.
  kind: param
  key: 'param'
  arg_name: 'labels'
  type_name: 'array_like'
  is_optional: True
  raw_type_name: 'array_like, optional'
- DocstringParam
  description: |
    `labels` to include in output. If None (default), all values where
    `labels` is non-zero are used.
  kind: param
  key: 'param'
  arg_name: 'index'
  type_name: 'int or sequence of ints'
  is_optional: True
  raw_type_name: 'int or sequence of ints, optional'
- DocstringReturns
  description: |
    Values of standard deviation, for each sub-region if `labels` and
    `index` are specified.
  kind: returns
  key: 'returns'
  type_name: 'float or ndarray'
  is_generator: False
  return_name: 'standard_deviation'
- DocstringMeta
  description: 'label, variance, maximum, minimum, extrema'
  kind: text
  key: 'see_also'
  title: 'See Also'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: '>>> import numpy as np'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: |
    >>> a = np.array([[1, 2, 0, 0],
    ...               [5, 3, 0, 4],
    ...               [0, 0, 0, 7],
    ...               [9, 3, 0, 0]])
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: '>>> from scipy import ndimage'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: |
    >>> ndimage.standard_deviation(a)
    2.7585095613392387
- DocstringExample
  description: 'Features to process can be specified using `labels` and `index`:'
  kind: examples
  key: 'examples'
  snippet: '>>> lbl, nlbl = ndimage.label(a)'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: |
    >>> ndimage.standard_deviation(a, lbl, index=np.arange(1, nlbl+1))
    array([ 1.479,  1.5  ,  3.   ])
- DocstringExample
  description: 'If no index is given, non-zero `labels` are processed:'
  kind: examples
  key: 'examples'
  snippet: |
    >>> ndimage.standard_deviation(a, lbl)
    2.4874685927665499
=== detect
numpydoc
=== compose numpydoc
Calculate the standard deviation of the values of an N-D image array,
optionally at specified sub-regions.

Parameters
----------
input : array_like
    N-D image data to process.
labels : array_like, optional
    Labels to identify sub-regions in `input`.
    If not None, must be same shape as `input`.
index : int or sequence of ints, optional
    `labels` to include in output. If None (default), all values where
    `labels` is non-zero are used.

Returns
-------
standard_deviation : float or ndarray
    Values of standard deviation, for each sub-region if `labels` and
    `index` are specified.

See Also
--------
label, variance, maximum, minimum, extrema

Examples
--------
>>> import numpy as np
>>> a = np.array([[1, 2, 0, 0],
...               [5, 3, 0, 4],
...               [0, 0, 0, 7],
...               [9, 3, 0, 0]])
>>> from scipy import ndimage
>>> ndimage.standard_deviation(a)
2.7585095613392387

Features to process can be specified using `labels` and `index`:

>>> lbl, nlbl = ndimage.label(a)
>>> ndimage.standard_deviation(a, lbl, index=np.arange(1, nlbl+1))
array([ 1.479,  1.5  ,  3.   ])

If no index is given, non-zero `labels` are processed:

>>> ndimage.standard_deviation(a, lbl)
2.4874685927665499
