summaryrefslogtreecommitdiff
path: root/numpy/add_newdocs.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/add_newdocs.py')
-rw-r--r--numpy/add_newdocs.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py
index 46601b8ef..b00673d79 100644
--- a/numpy/add_newdocs.py
+++ b/numpy/add_newdocs.py
@@ -552,10 +552,26 @@ add_newdoc('numpy.core', 'broadcast', ('iters',
"""))
-add_newdoc('numpy.core', 'broadcast', ('nd',
+add_newdoc('numpy.core', 'broadcast', ('ndim',
"""
Number of dimensions of broadcasted result.
+ .. versionadded:: 1.12.0
+
+ Examples
+ --------
+ >>> x = np.array([1, 2, 3])
+ >>> y = np.array([[4], [5], [6]])
+ >>> b = np.broadcast(x, y)
+ >>> b.ndim
+ 2
+
+ """))
+
+add_newdoc('numpy.core', 'broadcast', ('nd',
+ """
+ Number of dimensions of broadcasted result. Alias for `ndim`.
+
Examples
--------
>>> x = np.array([1, 2, 3])