Repository: numpy/numpy
File: numpy/lib/_type_check_impl.py (Python)

Code before:
    `posinf` keyword and -infinity is replaced by the most negative finite
    floating point values representable by ``x.dtype`` or by the user defined
    value in `neginf` keyword.

    For complex dtypes, the above is applied to each of the real and
    imaginary components of `x` separately.

    If `x` is not inexact, then no replacements are made.

    Parameters
    ----------
    x : scalar or array_like
        Input data.
    copy : bool, optional
        Whether to create a copy of `x` (True) or to replace values
        in-place (False). The in-place operation only occurs if
        casting to an array does not require a copy.
        Default is True.
    nan : array_like, int, float, bool, optional
        Values to be used to fill NaN values. If no values are passed
        then NaN values will be replaced with 0.0.
    posinf : array_like, int, float, bool, optional
        Values to be used to fill positive infinity values. If no values are
        passed then positive infinity values will be replaced with a very
        large number.
    neginf : array_like, int, float, bool, optional
        Values to be used to fill negative infinity values. If no values are
        passed then negative infinity values will be replaced with a very
        small (or negative) number.

    Returns
    -------
    out : ndarray
        `x`, with the non-finite values replaced. If `copy` is False, this may
        be `x` itself.

    See Also
    --------
    isinf : Shows which elements are positive or negative infinity.
    isneginf : Shows which elements are negative infinity.
    isposinf : Shows which elements are positive infinity.
    isnan : Shows which elements are Not a Number (NaN).
    isfinite : Shows which elements are finite (not NaN, not infinity)

    Notes
    -----
    NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic
    (IEEE 754). This means that Not a Number is not equivalent to infinity.

    Examples
    --------

Review comment (suggestion):
```suggestion
    neginf : {array_like, int, float, bool}, optional
```

It looks like we use curly brackets to group items in docstrings, e.g. the `ddof` argument: https://numpy.org/doc/stable/reference/generated/numpy.std.html#numpy-std

Please make a similar change for the other arguments.

Code after:
    `posinf` keyword and -infinity is replaced by the most negative finite
    floating point values representable by ``x.dtype`` or by the user defined
    value in `neginf` keyword.

    For complex dtypes, the above is applied to each of the real and
    imaginary components of `x` separately.

    If `x` is not inexact, then no replacements are made.

    Parameters
    ----------
    x : scalar or array_like
        Input data.
    copy : bool, optional
        Whether to create a copy of `x` (True) or to replace values
        in-place (False). The in-place operation only occurs if
        casting to an array does not require a copy.
        Default is True.
    nan : int, float, or bool or array_like of int, float, or bool, optional
        Values to be used to fill NaN values. If no values are passed
        then NaN values will be replaced with 0.0.
    posinf : int, float, or bool or array_like of int, float, or bool, optional
        Values to be used to fill positive infinity values. If no values are
        passed then positive infinity values will be replaced with a very
        large number.
    neginf : int, float, or bool or array_like of int, float, or bool, optional
        Values to be used to fill negative infinity values. If no values are
        passed then negative infinity values will be replaced with a very
        small (or negative) number.

    Returns
    -------
    out : ndarray
        `x`, with the non-finite values replaced. If `copy` is False, this may
        be `x` itself.

    See Also
    --------
    isinf : Shows which elements are positive or negative infinity.
    isneginf : Shows which elements are negative infinity.
    isposinf : Shows which elements are positive infinity.
    isnan : Shows which elements are Not a Number (NaN).
    isfinite : Shows which elements are finite (not NaN, not infinity)

    Notes
    -----
    NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic
    (IEEE 754). This means that Not a Number is not equivalent to infinity.

    Examples
    --------