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

    Counts the number of tied values.

    Parameters
    ----------
    x : sequence
        Sequence of data on which to counts the ties
    use_missing : bool, optional
        Whether to consider missing values as tied.

    Returns
    -------
    count_tied_groups : dict
        Returns a dictionary (nb of ties: nb of groups).

    Examples
    --------
    >>> from scipy.stats import mstats
    >>> import numpy as np
    >>> z = [0, 0, 0, 2, 2, 2, 3, 3, 4, 5, 6]
    >>> mstats.count_tied_groups(z)
    {2: 1, 3: 2}

    In the above example, the ties were 0 (3x), 2 (3x) and 3 (2x).

    >>> z = np.ma.array([0, 0, 1, 2, 2, 2, 3, 3, 4, 5, 6])
    >>> mstats.count_tied_groups(z)
    {2: 2, 3: 1}
    >>> z[[1,-1]] = np.ma.masked
    >>> mstats.count_tied_groups(z, use_missing=True)
    {2: 2, 3: 1}

    
=== parse numpydoc
short_description: 'Counts the number of tied values.'
blank_after_short_description: True
blank_after_long_description: False
style: numpydoc
- DocstringParam
  description: 'Sequence of data on which to counts the ties'
  kind: param
  key: 'param'
  arg_name: 'x'
  type_name: 'sequence'
  is_optional: False
- DocstringParam
  description: 'Whether to consider missing values as tied.'
  kind: param
  key: 'param'
  arg_name: 'use_missing'
  type_name: 'bool'
  is_optional: True
  raw_type_name: 'bool, optional'
- DocstringReturns
  description: 'Returns a dictionary (nb of ties: nb of groups).'
  kind: returns
  key: 'returns'
  type_name: 'dict'
  is_generator: False
  return_name: 'count_tied_groups'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: '>>> from scipy.stats import mstats'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: '>>> import numpy as np'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: '>>> z = [0, 0, 0, 2, 2, 2, 3, 3, 4, 5, 6]'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: |
    >>> mstats.count_tied_groups(z)
    {2: 1, 3: 2}
- DocstringExample
  description: 'In the above example, the ties were 0 (3x), 2 (3x) and 3 (2x).'
  kind: examples
  key: 'examples'
  snippet: '>>> z = np.ma.array([0, 0, 1, 2, 2, 2, 3, 3, 4, 5, 6])'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: |
    >>> mstats.count_tied_groups(z)
    {2: 2, 3: 1}
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: '>>> z[[1,-1]] = np.ma.masked'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: |
    >>> mstats.count_tied_groups(z, use_missing=True)
    {2: 2, 3: 1}
=== detect
numpydoc
=== compose numpydoc
Counts the number of tied values.

Parameters
----------
x : sequence
    Sequence of data on which to counts the ties
use_missing : bool, optional
    Whether to consider missing values as tied.

Returns
-------
count_tied_groups : dict
    Returns a dictionary (nb of ties: nb of groups).

Examples
--------
>>> from scipy.stats import mstats
>>> import numpy as np
>>> z = [0, 0, 0, 2, 2, 2, 3, 3, 4, 5, 6]
>>> mstats.count_tied_groups(z)
{2: 1, 3: 2}

In the above example, the ties were 0 (3x), 2 (3x) and 3 (2x).

>>> z = np.ma.array([0, 0, 1, 2, 2, 2, 3, 3, 4, 5, 6])
>>> mstats.count_tied_groups(z)
{2: 2, 3: 1}
>>> z[[1,-1]] = np.ma.masked
>>> mstats.count_tied_groups(z, use_missing=True)
{2: 2, 3: 1}
