summaryrefslogtreecommitdiff
path: root/numpy/lib/arraypad.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2019-03-16 10:06:39 -0700
committerGitHub <noreply@github.com>2019-03-16 10:06:39 -0700
commit9a35ab439809270dfb582ed1ddf0376512ec4005 (patch)
tree763e0904dd9e2c370596a40c049e82b3298560a3 /numpy/lib/arraypad.py
parent0764929543c85decde9d664367dbf7d8f137fe1f (diff)
parentdf286d00bf6236f0158fc2cedd91dd3905fc05ca (diff)
downloadnumpy-9a35ab439809270dfb582ed1ddf0376512ec4005.tar.gz
Merge branch 'master' into deprecate-float-order
Diffstat (limited to 'numpy/lib/arraypad.py')
-rw-r--r--numpy/lib/arraypad.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/lib/arraypad.py b/numpy/lib/arraypad.py
index b236cc449..630767dc5 100644
--- a/numpy/lib/arraypad.py
+++ b/numpy/lib/arraypad.py
@@ -957,12 +957,12 @@ def _as_pairs(x, ndim, as_index=False):
# Public functions
-def _pad_dispatcher(array, pad_width, mode, **kwargs):
+def _pad_dispatcher(array, pad_width, mode=None, **kwargs):
return (array,)
@array_function_dispatch(_pad_dispatcher, module='numpy')
-def pad(array, pad_width, mode, **kwargs):
+def pad(array, pad_width, mode='constant', **kwargs):
"""
Pads an array.
@@ -977,10 +977,10 @@ def pad(array, pad_width, mode, **kwargs):
((before, after),) yields same before and after pad for each axis.
(pad,) or int is a shortcut for before = after = pad width for all
axes.
- mode : str or function
+ mode : str or function, optional
One of the following string values or a user supplied function.
- 'constant'
+ 'constant' (default)
Pads with a constant value.
'edge'
Pads with the edge values of array.