prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Default value for "mode" in "ndimage.shift"
  In scipy.ndimage.shift the mode's default value is 'constant', but [in the documentation](https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.shift.html#scipy.ndimage.shift) it says Default is 'reflect'.
  Which of the two is wrong?
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `scipy/ndimage/_ni_docstrings.py`
  Content:
  ```
  1 """Docstring components common to several ndimage functions."""
  2 from __future__ import division, print_function, absolute_import
  3 
  4 from scipy.misc import doccer
  5 
  6 __all__ = ['docfiller']
  7 
  8 
  9 _input_doc = (
  10 """input : array_like
  11     The input array.""")
  12 _axis_doc = (
  13 """axis : int, optional
  14     The axis of `input` along which to calculate. Default is -1.""")
  15 _output_doc = (
  16 """output : array or dtype, optional
  17     The array in which to place the output, or the dtype of the
  18     returned array. By default an array of the same dtype as input
  19     will be created.""")
  20 _size_foot_doc = (
  21 """size : scalar or tuple, optional
  22     See footprint, below. Ignored if footprint is given.
  23 footprint : array, optional
  24     Either `size` or `footprint` must be defined.  `size` gives
  25     the shape that is taken from the input array, at every element
  26     position, to define the input to the filter function.
  27     `footprint` is a boolean array that specifies (implicitly) a
  28     shape, but also which of the elements within this shape will get
  29     passed to the filter function.  Thus ``size=(n,m)`` is equivalent
  30     to ``footprint=np.ones((n,m))``.  We adjust `size` to the number
  31     of dimensions of the input array, so that, if the input array is
  32     shape (10,10,10), and `size` is 2, then the actual size used is
  33     (2,2,2). When `footprint` is given, `size` is ignored.""")
  34 _mode_doc = (
  35 """mode : {'reflect', 'constant', 'nearest', 'mirror', 'wrap'}, optional
  36     The `mode` parameter determines how the input array is extended
  37     when the filter overlaps a border. Default is 'reflect'. Behavior
  38     for each valid value is as follows:
  39 
  40     'reflect' (`d c b a | a b c d | d c b a`)
  41         The input is extended by reflecting about the edge of the last
  42         pixel.
  43 
  44     'constant' (`k k k k | a b c d | k k k k`)
  45         The input is extended by filling all values beyond the edge with
  46         the same constant value, defined by the `cval` parameter.
  47 
  48     'nearest' (`a a a a | a b c d | d d d d`)
  49         The input is extended by replicating the last pixel.
  50 
  51     'mirror' (`d c b | a b c d | c b a`)
  52         The input is extended by reflecting about the center of the last
  53         pixel.
  54 
  55     'wrap' (`a b c d | a b c d | a b c d`)
  56         The input is extended by wrapping around to the opposite edge.""")
  57 _mode_multiple_doc = (
  58 """mode : str or sequence, optional
  59     The `mode` parameter determines how the input array is extended
  60     when the filter overlaps a border. By passing a sequence of modes
  61     with length equal to the number of dimensions of the input array,
  62     different modes can be specified along each axis. Default value is
  63     'reflect'. The valid values and their behavior is as follows:
  64 
  65     'reflect' (`d c b a | a b c d | d c b a`)
  66         The input is extended by reflecting about the edge of the last
  67         pixel.
  68 
  69     'constant' (`k k k k | a b c d | k k k k`)
  70         The input is extended by filling all values beyond the edge with
  71         the same constant value, defined by the `cval` parameter.
  72 
  73     'nearest' (`a a a a | a b c d | d d d d`)
  74         The input is extended by replicating the last pixel.
  75 
  76     'mirror' (`d c b | a b c d | c b a`)
  77         The input is extended by reflecting about the center of the last
  78         pixel.
  79 
  80     'wrap' (`a b c d | a b c d | a b c d`)
  81         The input is extended by wrapping around to the opposite edge.""")
  82 _cval_doc = (
  83 """cval : scalar, optional
  84     Value to fill past edges of input if `mode` is 'constant'. Default
  85     is 0.0.""")
  86 _origin_doc = (
  87 """origin : int, optional
  88     Controls the placement of the filter on the input array's pixels.
  89     A value of 0 (the default) centers the filter over the pixel, with
  90     positive values shifting the filter to the left, and negative ones
  91     to the right.""")
  92 _origin_multiple_doc = (
  93 """origin : int or sequence, optional
  94     Controls the placement of the filter on the input array's pixels.
  95     A value of 0 (the default) centers the filter over the pixel, with
  96     positive values shifting the filter to the left, and negative ones
  97     to the right. By passing a sequence of origins with length equal to
  98     the number of dimensions of the input array, different shifts can
  99     be specified along each axis.""")
  100 _extra_arguments_doc = (
  101 """extra_arguments : sequence, optional
  102     Sequence of extra positional arguments to pass to passed function.""")
  103 _extra_keywords_doc = (
  104 """extra_keywords : dict, optional
  105     dict of extra keyword arguments to pass to passed function.""")
  106 _prefilter_doc = (
  107 """prefilter : bool, optional
  108     Determines if the input array is prefiltered with `spline_filter`
  109     before interpolation. The default is True, which will create a
  110     temporary `float64` array of filtered values if `order > 1`. If
  111     setting this to False, the output will be slightly blurred if
  112     `order > 1`, unless the input is prefiltered, i.e. it is the result
  113     of calling `spline_filter` on the original input.""")
  114 
  115 docdict = {
  116     'input': _input_doc,
  117     'axis': _axis_doc,
  118     'output': _output_doc,
  119     'size_foot': _size_foot_doc,
  120     'mode': _mode_doc,
  121     'mode_multiple': _mode_multiple_doc,
  122     'cval': _cval_doc,
  123     'origin': _origin_doc,
  124     'origin_multiple': _origin_multiple_doc,
  125     'extra_arguments': _extra_arguments_doc,
  126     'extra_keywords': _extra_keywords_doc,
  127     'prefilter': _prefilter_doc
  128     }
  129 
  130 docfiller = doccer.filldoc(docdict)
  131
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/scipy/ndimage/_ni_docstrings.py b/scipy/ndimage/_ni_docstrings.py
  --- a/scipy/ndimage/_ni_docstrings.py
  +++ b/scipy/ndimage/_ni_docstrings.py
  @@ -34,7 +34,7 @@
   _mode_doc = (
   """mode : {'reflect', 'constant', 'nearest', 'mirror', 'wrap'}, optional
       The `mode` parameter determines how the input array is extended
  -    when the filter overlaps a border. Default is 'reflect'. Behavior
  +    when the filter overlaps a border. Default is 'constant'. Behavior
       for each valid value is as follows:
   
       'reflect' (`d c b a | a b c d | d c b a`)
  
verification_info: {"golden_diff": "diff --git a/scipy/ndimage/_ni_docstrings.py b/scipy/ndimage/_ni_docstrings.py\n--- a/scipy/ndimage/_ni_docstrings.py\n+++ b/scipy/ndimage/_ni_docstrings.py\n@@ -34,7 +34,7 @@\n _mode_doc = (\n \"\"\"mode : {'reflect', 'constant', 'nearest', 'mirror', 'wrap'}, optional\n     The `mode` parameter determines how the input array is extended\n-    when the filter overlaps a border. Default is 'reflect'. Behavior\n+    when the filter overlaps a border. Default is 'constant'. Behavior\n     for each valid value is as follows:\n \n     'reflect' (`d c b a | a b c d | d c b a`)\n", "issue": "Default value for \"mode\" in \"ndimage.shift\"\nIn scipy.ndimage.shift the mode's default value is 'constant', but [in the documentation](https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.shift.html#scipy.ndimage.shift) it says Default is 'reflect'.\r\nWhich of the two is wrong?\n", "before_files": [{"content": "\"\"\"Docstring components common to several ndimage functions.\"\"\"\nfrom __future__ import division, print_function, absolute_import\n\nfrom scipy.misc import doccer\n\n__all__ = ['docfiller']\n\n\n_input_doc = (\n\"\"\"input : array_like\n    The input array.\"\"\")\n_axis_doc = (\n\"\"\"axis : int, optional\n    The axis of `input` along which to calculate. Default is -1.\"\"\")\n_output_doc = (\n\"\"\"output : array or dtype, optional\n    The array in which to place the output, or the dtype of the\n    returned array. By default an array of the same dtype as input\n    will be created.\"\"\")\n_size_foot_doc = (\n\"\"\"size : scalar or tuple, optional\n    See footprint, below. Ignored if footprint is given.\nfootprint : array, optional\n    Either `size` or `footprint` must be defined.  `size` gives\n    the shape that is taken from the input array, at every element\n    position, to define the input to the filter function.\n    `footprint` is a boolean array that specifies (implicitly) a\n    shape, but also which of the elements within this shape will get\n    passed to the filter function.  Thus ``size=(n,m)`` is equivalent\n    to ``footprint=np.ones((n,m))``.  We adjust `size` to the number\n    of dimensions of the input array, so that, if the input array is\n    shape (10,10,10), and `size` is 2, then the actual size used is\n    (2,2,2). When `footprint` is given, `size` is ignored.\"\"\")\n_mode_doc = (\n\"\"\"mode : {'reflect', 'constant', 'nearest', 'mirror', 'wrap'}, optional\n    The `mode` parameter determines how the input array is extended\n    when the filter overlaps a border. Default is 'reflect'. Behavior\n    for each valid value is as follows:\n\n    'reflect' (`d c b a | a b c d | d c b a`)\n        The input is extended by reflecting about the edge of the last\n        pixel.\n\n    'constant' (`k k k k | a b c d | k k k k`)\n        The input is extended by filling all values beyond the edge with\n        the same constant value, defined by the `cval` parameter.\n\n    'nearest' (`a a a a | a b c d | d d d d`)\n        The input is extended by replicating the last pixel.\n\n    'mirror' (`d c b | a b c d | c b a`)\n        The input is extended by reflecting about the center of the last\n        pixel.\n\n    'wrap' (`a b c d | a b c d | a b c d`)\n        The input is extended by wrapping around to the opposite edge.\"\"\")\n_mode_multiple_doc = (\n\"\"\"mode : str or sequence, optional\n    The `mode` parameter determines how the input array is extended\n    when the filter overlaps a border. By passing a sequence of modes\n    with length equal to the number of dimensions of the input array,\n    different modes can be specified along each axis. Default value is\n    'reflect'. The valid values and their behavior is as follows:\n\n    'reflect' (`d c b a | a b c d | d c b a`)\n        The input is extended by reflecting about the edge of the last\n        pixel.\n\n    'constant' (`k k k k | a b c d | k k k k`)\n        The input is extended by filling all values beyond the edge with\n        the same constant value, defined by the `cval` parameter.\n\n    'nearest' (`a a a a | a b c d | d d d d`)\n        The input is extended by replicating the last pixel.\n\n    'mirror' (`d c b | a b c d | c b a`)\n        The input is extended by reflecting about the center of the last\n        pixel.\n\n    'wrap' (`a b c d | a b c d | a b c d`)\n        The input is extended by wrapping around to the opposite edge.\"\"\")\n_cval_doc = (\n\"\"\"cval : scalar, optional\n    Value to fill past edges of input if `mode` is 'constant'. Default\n    is 0.0.\"\"\")\n_origin_doc = (\n\"\"\"origin : int, optional\n    Controls the placement of the filter on the input array's pixels.\n    A value of 0 (the default) centers the filter over the pixel, with\n    positive values shifting the filter to the left, and negative ones\n    to the right.\"\"\")\n_origin_multiple_doc = (\n\"\"\"origin : int or sequence, optional\n    Controls the placement of the filter on the input array's pixels.\n    A value of 0 (the default) centers the filter over the pixel, with\n    positive values shifting the filter to the left, and negative ones\n    to the right. By passing a sequence of origins with length equal to\n    the number of dimensions of the input array, different shifts can\n    be specified along each axis.\"\"\")\n_extra_arguments_doc = (\n\"\"\"extra_arguments : sequence, optional\n    Sequence of extra positional arguments to pass to passed function.\"\"\")\n_extra_keywords_doc = (\n\"\"\"extra_keywords : dict, optional\n    dict of extra keyword arguments to pass to passed function.\"\"\")\n_prefilter_doc = (\n\"\"\"prefilter : bool, optional\n    Determines if the input array is prefiltered with `spline_filter`\n    before interpolation. The default is True, which will create a\n    temporary `float64` array of filtered values if `order > 1`. If\n    setting this to False, the output will be slightly blurred if\n    `order > 1`, unless the input is prefiltered, i.e. it is the result\n    of calling `spline_filter` on the original input.\"\"\")\n\ndocdict = {\n    'input': _input_doc,\n    'axis': _axis_doc,\n    'output': _output_doc,\n    'size_foot': _size_foot_doc,\n    'mode': _mode_doc,\n    'mode_multiple': _mode_multiple_doc,\n    'cval': _cval_doc,\n    'origin': _origin_doc,\n    'origin_multiple': _origin_multiple_doc,\n    'extra_arguments': _extra_arguments_doc,\n    'extra_keywords': _extra_keywords_doc,\n    'prefilter': _prefilter_doc\n    }\n\ndocfiller = doccer.filldoc(docdict)\n", "path": "scipy/ndimage/_ni_docstrings.py"}], "after_files": [{"content": "\"\"\"Docstring components common to several ndimage functions.\"\"\"\nfrom __future__ import division, print_function, absolute_import\n\nfrom scipy.misc import doccer\n\n__all__ = ['docfiller']\n\n\n_input_doc = (\n\"\"\"input : array_like\n    The input array.\"\"\")\n_axis_doc = (\n\"\"\"axis : int, optional\n    The axis of `input` along which to calculate. Default is -1.\"\"\")\n_output_doc = (\n\"\"\"output : array or dtype, optional\n    The array in which to place the output, or the dtype of the\n    returned array. By default an array of the same dtype as input\n    will be created.\"\"\")\n_size_foot_doc = (\n\"\"\"size : scalar or tuple, optional\n    See footprint, below. Ignored if footprint is given.\nfootprint : array, optional\n    Either `size` or `footprint` must be defined.  `size` gives\n    the shape that is taken from the input array, at every element\n    position, to define the input to the filter function.\n    `footprint` is a boolean array that specifies (implicitly) a\n    shape, but also which of the elements within this shape will get\n    passed to the filter function.  Thus ``size=(n,m)`` is equivalent\n    to ``footprint=np.ones((n,m))``.  We adjust `size` to the number\n    of dimensions of the input array, so that, if the input array is\n    shape (10,10,10), and `size` is 2, then the actual size used is\n    (2,2,2). When `footprint` is given, `size` is ignored.\"\"\")\n_mode_doc = (\n\"\"\"mode : {'reflect', 'constant', 'nearest', 'mirror', 'wrap'}, optional\n    The `mode` parameter determines how the input array is extended\n    when the filter overlaps a border. Default is 'constant'. Behavior\n    for each valid value is as follows:\n\n    'reflect' (`d c b a | a b c d | d c b a`)\n        The input is extended by reflecting about the edge of the last\n        pixel.\n\n    'constant' (`k k k k | a b c d | k k k k`)\n        The input is extended by filling all values beyond the edge with\n        the same constant value, defined by the `cval` parameter.\n\n    'nearest' (`a a a a | a b c d | d d d d`)\n        The input is extended by replicating the last pixel.\n\n    'mirror' (`d c b | a b c d | c b a`)\n        The input is extended by reflecting about the center of the last\n        pixel.\n\n    'wrap' (`a b c d | a b c d | a b c d`)\n        The input is extended by wrapping around to the opposite edge.\"\"\")\n_mode_multiple_doc = (\n\"\"\"mode : str or sequence, optional\n    The `mode` parameter determines how the input array is extended\n    when the filter overlaps a border. By passing a sequence of modes\n    with length equal to the number of dimensions of the input array,\n    different modes can be specified along each axis. Default value is\n    'reflect'. The valid values and their behavior is as follows:\n\n    'reflect' (`d c b a | a b c d | d c b a`)\n        The input is extended by reflecting about the edge of the last\n        pixel.\n\n    'constant' (`k k k k | a b c d | k k k k`)\n        The input is extended by filling all values beyond the edge with\n        the same constant value, defined by the `cval` parameter.\n\n    'nearest' (`a a a a | a b c d | d d d d`)\n        The input is extended by replicating the last pixel.\n\n    'mirror' (`d c b | a b c d | c b a`)\n        The input is extended by reflecting about the center of the last\n        pixel.\n\n    'wrap' (`a b c d | a b c d | a b c d`)\n        The input is extended by wrapping around to the opposite edge.\"\"\")\n_cval_doc = (\n\"\"\"cval : scalar, optional\n    Value to fill past edges of input if `mode` is 'constant'. Default\n    is 0.0.\"\"\")\n_origin_doc = (\n\"\"\"origin : int, optional\n    Controls the placement of the filter on the input array's pixels.\n    A value of 0 (the default) centers the filter over the pixel, with\n    positive values shifting the filter to the left, and negative ones\n    to the right.\"\"\")\n_origin_multiple_doc = (\n\"\"\"origin : int or sequence, optional\n    Controls the placement of the filter on the input array's pixels.\n    A value of 0 (the default) centers the filter over the pixel, with\n    positive values shifting the filter to the left, and negative ones\n    to the right. By passing a sequence of origins with length equal to\n    the number of dimensions of the input array, different shifts can\n    be specified along each axis.\"\"\")\n_extra_arguments_doc = (\n\"\"\"extra_arguments : sequence, optional\n    Sequence of extra positional arguments to pass to passed function.\"\"\")\n_extra_keywords_doc = (\n\"\"\"extra_keywords : dict, optional\n    dict of extra keyword arguments to pass to passed function.\"\"\")\n_prefilter_doc = (\n\"\"\"prefilter : bool, optional\n    Determines if the input array is prefiltered with `spline_filter`\n    before interpolation. The default is True, which will create a\n    temporary `float64` array of filtered values if `order > 1`. If\n    setting this to False, the output will be slightly blurred if\n    `order > 1`, unless the input is prefiltered, i.e. it is the result\n    of calling `spline_filter` on the original input.\"\"\")\n\ndocdict = {\n    'input': _input_doc,\n    'axis': _axis_doc,\n    'output': _output_doc,\n    'size_foot': _size_foot_doc,\n    'mode': _mode_doc,\n    'mode_multiple': _mode_multiple_doc,\n    'cval': _cval_doc,\n    'origin': _origin_doc,\n    'origin_multiple': _origin_multiple_doc,\n    'extra_arguments': _extra_arguments_doc,\n    'extra_keywords': _extra_keywords_doc,\n    'prefilter': _prefilter_doc\n    }\n\ndocfiller = doccer.filldoc(docdict)\n", "path": "scipy/ndimage/_ni_docstrings.py"}]}