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

    Return the character for the minimum-size type to which given types can
    be safely cast.

    The returned type character must represent the smallest size dtype such
    that an array of the returned type can handle the data from an array of
    all types in `typechars` (or if `typechars` is an array, then its
    dtype.char).

    Parameters
    ----------
    typechars : list of str or array_like
        If a list of strings, each string should represent a dtype.
        If array_like, the character representation of the array dtype is used.
    typeset : str or list of str, optional
        The set of characters that the returned character is chosen from.
        The default set is 'GDFgdf'.
    default : str, optional
        The default character, this is returned if none of the characters in
        `typechars` matches a character in `typeset`.

    Returns
    -------
    typechar : str
        The character representing the minimum-size type that was found.

    See Also
    --------
    dtype

    Examples
    --------
    >>> import numpy as np
    >>> np.mintypecode(['d', 'f', 'S'])
    'd'
    >>> x = np.array([1.1, 2-3.j])
    >>> np.mintypecode(x)
    'D'

    >>> np.mintypecode('abceh', default='G')
    'G'

    
=== parse numpydoc
short_description: |
  Return the character for the minimum-size type to which given types can
  be safely cast.
long_description: |
  The returned type character must represent the smallest size dtype such
  that an array of the returned type can handle the data from an array of
  all types in `typechars` (or if `typechars` is an array, then its
  dtype.char).
blank_after_short_description: True
blank_after_long_description: True
style: numpydoc
- DocstringParam
  description: |
    If a list of strings, each string should represent a dtype.
    If array_like, the character representation of the array dtype is used.
  kind: param
  key: 'param'
  arg_name: 'typechars'
  type_name: 'list of str or array_like'
  is_optional: False
- DocstringParam
  description: |
    The set of characters that the returned character is chosen from.
    The default set is 'GDFgdf'.
  kind: param
  key: 'param'
  arg_name: 'typeset'
  type_name: 'str or list of str'
  is_optional: True
  raw_type_name: 'str or list of str, optional'
- DocstringParam
  description: |
    The default character, this is returned if none of the characters in
    `typechars` matches a character in `typeset`.
  kind: param
  key: 'param'
  arg_name: 'default'
  type_name: 'str'
  is_optional: True
  raw_type_name: 'str, optional'
- DocstringReturns
  description: 'The character representing the minimum-size type that was found.'
  kind: returns
  key: 'returns'
  type_name: 'str'
  is_generator: False
  return_name: 'typechar'
- DocstringMeta
  description: 'dtype'
  kind: text
  key: 'see_also'
  title: 'See Also'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: '>>> import numpy as np'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: |
    >>> np.mintypecode(['d', 'f', 'S'])
    'd'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: '>>> x = np.array([1.1, 2-3.j])'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: |
    >>> np.mintypecode(x)
    'D'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: |
    >>> np.mintypecode('abceh', default='G')
    'G'
=== detect
numpydoc
=== compose numpydoc
Return the character for the minimum-size type to which given types can
be safely cast.

The returned type character must represent the smallest size dtype such
that an array of the returned type can handle the data from an array of
all types in `typechars` (or if `typechars` is an array, then its
dtype.char).

Parameters
----------
typechars : list of str or array_like
    If a list of strings, each string should represent a dtype.
    If array_like, the character representation of the array dtype is used.
typeset : str or list of str, optional
    The set of characters that the returned character is chosen from.
    The default set is 'GDFgdf'.
default : str, optional
    The default character, this is returned if none of the characters in
    `typechars` matches a character in `typeset`.

Returns
-------
typechar : str
    The character representing the minimum-size type that was found.

See Also
--------
dtype

Examples
--------
>>> import numpy as np
>>> np.mintypecode(['d', 'f', 'S'])
'd'
>>> x = np.array([1.1, 2-3.j])
>>> np.mintypecode(x)
'D'
>>> np.mintypecode('abceh', default='G')
'G'
