summaryrefslogtreecommitdiff
path: root/numpy/core/fromnumeric.py
diff options
context:
space:
mode:
authorJaime <jaime.frio@gmail.com>2016-07-14 09:55:04 +0200
committerGitHub <noreply@github.com>2016-07-14 09:55:04 +0200
commit3ebf47b88434dcf74841f079e75c5edb57c149ad (patch)
tree7ba26f731680b24e2b4cd4f5c563551356d3350e /numpy/core/fromnumeric.py
parent08fc49e1b33e4da9e14e375f399ba92c615eb569 (diff)
parent9a3eb4bf7941cbc0238760d6b43bb55ee9a04057 (diff)
downloadnumpy-3ebf47b88434dcf74841f079e75c5edb57c149ad.tar.gz
Merge pull request #7834 from madphysicist/patch-1
DOC: Added an example
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r--numpy/core/fromnumeric.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py
index 28ee4fffa..7ec522abf 100644
--- a/numpy/core/fromnumeric.py
+++ b/numpy/core/fromnumeric.py
@@ -381,6 +381,8 @@ def repeat(a, repeats, axis=None):
Examples
--------
+ >>> np.repeat(3, 4)
+ array([3, 3, 3, 3])
>>> x = np.array([[1,2],[3,4]])
>>> np.repeat(x, 2)
array([1, 1, 2, 2, 3, 3, 4, 4])