summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/lib/shape_base.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/numpy/lib/shape_base.py b/numpy/lib/shape_base.py
index 615cf88f4..ffbe56721 100644
--- a/numpy/lib/shape_base.py
+++ b/numpy/lib/shape_base.py
@@ -799,6 +799,9 @@ def tile(A, reps):
Thus for an `A` of shape (2, 3, 4, 5), a `reps` of (2, 2) is treated as
(1, 1, 2, 2).
+ Note : Although tile may be used for broadcasting, it is strongly
+ recommended to use numpy's broadcasting operations and functions.
+
Parameters
----------
A : array_like
@@ -814,6 +817,7 @@ def tile(A, reps):
See Also
--------
repeat : Repeat elements of an array.
+ broadcast_to : Broadcast an array to a new shape
Examples
--------
@@ -837,6 +841,12 @@ def tile(A, reps):
[1, 2],
[3, 4]])
+ >>> c = np.array([1,2,3,4])
+ >>> np.tile(c,(4,1))
+ array([[1, 2, 3, 4],
+ [1, 2, 3, 4],
+ [1, 2, 3, 4],
+ [1, 2, 3, 4]])
"""
try:
tup = tuple(reps)