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

    Pad the input array.

    Parameters
    ----------
    x : array
        Input array.
    pad_width : int or tuple of ints or sequence of pairs of ints
        Pad the input array with this many elements from each side.
        If a sequence of tuples, ``[(before_0, after_0), ... (before_N, after_N)]``,
        each pair applies to the corresponding axis of ``x``.
        A single tuple, ``(before, after)``, is equivalent to a list of ``x.ndim``
        copies of this tuple.
    mode : str, optional
        Only "constant" mode is currently supported, which pads with
        the value passed to `constant_values`.
    constant_values : python scalar, optional
        Use this value to pad the input. Default is zero.
    xp : array_namespace, optional
        The standard-compatible namespace for `x`. Default: infer.

    Returns
    -------
    array
        The input array,
        padded with ``pad_width`` elements equal to ``constant_values``.
    
=== parse numpydoc
short_description: 'Pad the input array.'
blank_after_short_description: True
blank_after_long_description: False
style: numpydoc
- DocstringParam
  description: 'Input array.'
  kind: param
  key: 'param'
  arg_name: 'x'
  type_name: 'array'
  is_optional: False
- DocstringParam
  description: |
    Pad the input array with this many elements from each side.
    If a sequence of tuples, ``[(before_0, after_0), ... (before_N, after_N)]``,
    each pair applies to the corresponding axis of ``x``.
    A single tuple, ``(before, after)``, is equivalent to a list of ``x.ndim``
    copies of this tuple.
  kind: param
  key: 'param'
  arg_name: 'pad_width'
  type_name: 'int or tuple of ints or sequence of pairs of ints'
  is_optional: False
- DocstringParam
  description: |
    Only "constant" mode is currently supported, which pads with
    the value passed to `constant_values`.
  kind: param
  key: 'param'
  arg_name: 'mode'
  type_name: 'str'
  is_optional: True
  raw_type_name: 'str, optional'
- DocstringParam
  description: 'Use this value to pad the input. Default is zero.'
  kind: param
  key: 'param'
  arg_name: 'constant_values'
  type_name: 'python scalar'
  is_optional: True
  default: 'zero'
  raw_type_name: 'python scalar, optional'
- DocstringParam
  description: 'The standard-compatible namespace for `x`. Default: infer.'
  kind: param
  key: 'param'
  arg_name: 'xp'
  type_name: 'array_namespace'
  is_optional: True
  default: 'infer'
  raw_type_name: 'array_namespace, optional'
- DocstringReturns
  description: |
    The input array,
    padded with ``pad_width`` elements equal to ``constant_values``.
  kind: returns
  key: 'returns'
  type_name: 'array'
  is_generator: False
=== detect
numpydoc
=== compose numpydoc
Pad the input array.

Parameters
----------
x : array
    Input array.
pad_width : int or tuple of ints or sequence of pairs of ints
    Pad the input array with this many elements from each side.
    If a sequence of tuples, ``[(before_0, after_0), ... (before_N, after_N)]``,
    each pair applies to the corresponding axis of ``x``.
    A single tuple, ``(before, after)``, is equivalent to a list of ``x.ndim``
    copies of this tuple.
mode : str, optional
    Only "constant" mode is currently supported, which pads with
    the value passed to `constant_values`.
constant_values : python scalar, optional
    Use this value to pad the input. Default is zero.
xp : array_namespace, optional
    The standard-compatible namespace for `x`. Default: infer.

Returns
-------
array
    The input array,
    padded with ``pad_width`` elements equal to ``constant_values``.
