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

    Get the current way of handling floating-point errors.

    Returns
    -------
    res : dict
        A dictionary with keys "divide", "over", "under", and "invalid",
        whose values are from the strings "ignore", "print", "log", "warn",
        "raise", and "call". The keys represent possible floating-point
        exceptions, and the values define how these exceptions are handled.

    See Also
    --------
    geterrcall, seterr, seterrcall

    Notes
    -----
    For complete documentation of the types of floating-point exceptions and
    treatment options, see `seterr`.

    **Concurrency note:** see :doc:`/reference/routines.err`

    Examples
    --------
    >>> import numpy as np
    >>> np.geterr()
    {'divide': 'warn', 'over': 'warn', 'under': 'ignore', 'invalid': 'warn'}
    >>> np.arange(3.) / np.arange(3.)  # doctest: +SKIP
    array([nan,  1.,  1.])
    RuntimeWarning: invalid value encountered in divide

    >>> oldsettings = np.seterr(all='warn', invalid='raise')
    >>> np.geterr()
    {'divide': 'warn', 'over': 'warn', 'under': 'warn', 'invalid': 'raise'}
    >>> np.arange(3.) / np.arange(3.)
    Traceback (most recent call last):
      ...
    FloatingPointError: invalid value encountered in divide
    >>> oldsettings = np.seterr(**oldsettings)  # restore original

    
=== parse numpydoc
short_description: 'Get the current way of handling floating-point errors.'
blank_after_short_description: True
blank_after_long_description: False
style: numpydoc
- DocstringReturns
  description: |
    A dictionary with keys "divide", "over", "under", and "invalid",
    whose values are from the strings "ignore", "print", "log", "warn",
    "raise", and "call". The keys represent possible floating-point
    exceptions, and the values define how these exceptions are handled.
  kind: returns
  key: 'returns'
  type_name: 'dict'
  is_generator: False
  return_name: 'res'
- DocstringMeta
  description: 'geterrcall, seterr, seterrcall'
  kind: text
  key: 'see_also'
  title: 'See Also'
- DocstringMeta
  description: |
    For complete documentation of the types of floating-point exceptions and
    treatment options, see `seterr`.
    
    **Concurrency note:** see :doc:`/reference/routines.err`
  kind: text
  key: 'notes'
  title: 'Notes'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: '>>> import numpy as np'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: |
    >>> np.geterr()
    {'divide': 'warn', 'over': 'warn', 'under': 'ignore', 'invalid': 'warn'}
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: |
    >>> np.arange(3.) / np.arange(3.)  # doctest: +SKIP
    array([nan,  1.,  1.])
    RuntimeWarning: invalid value encountered in divide
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: ">>> oldsettings = np.seterr(all='warn', invalid='raise')"
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: |
    >>> np.geterr()
    {'divide': 'warn', 'over': 'warn', 'under': 'warn', 'invalid': 'raise'}
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: |
    >>> np.arange(3.) / np.arange(3.)
    Traceback (most recent call last):
      ...
    FloatingPointError: invalid value encountered in divide
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: '>>> oldsettings = np.seterr(**oldsettings)  # restore original'
=== detect
numpydoc
=== compose numpydoc
Get the current way of handling floating-point errors.

Returns
-------
res : dict
    A dictionary with keys "divide", "over", "under", and "invalid",
    whose values are from the strings "ignore", "print", "log", "warn",
    "raise", and "call". The keys represent possible floating-point
    exceptions, and the values define how these exceptions are handled.

See Also
--------
geterrcall, seterr, seterrcall

Notes
-----
For complete documentation of the types of floating-point exceptions and
treatment options, see `seterr`.

**Concurrency note:** see :doc:`/reference/routines.err`

Examples
--------
>>> import numpy as np
>>> np.geterr()
{'divide': 'warn', 'over': 'warn', 'under': 'ignore', 'invalid': 'warn'}
>>> np.arange(3.) / np.arange(3.)  # doctest: +SKIP
array([nan,  1.,  1.])
RuntimeWarning: invalid value encountered in divide
>>> oldsettings = np.seterr(all='warn', invalid='raise')
>>> np.geterr()
{'divide': 'warn', 'over': 'warn', 'under': 'warn', 'invalid': 'raise'}
>>> np.arange(3.) / np.arange(3.)
Traceback (most recent call last):
  ...
FloatingPointError: invalid value encountered in divide
>>> oldsettings = np.seterr(**oldsettings)  # restore original
