From 8427866e4fb038f8d3af317e04a9cc9808bea8ca Mon Sep 17 00:00:00 2001 From: Stefan Peterson Date: Tue, 4 Apr 2017 10:58:20 +0200 Subject: DOC: Fix for issues #7622 and #7914 --- numpy/add_newdocs.py | 4 ++-- numpy/core/numeric.py | 4 ++-- numpy/ma/core.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py index ca735cbc2..6e859bd90 100644 --- a/numpy/add_newdocs.py +++ b/numpy/add_newdocs.py @@ -1452,8 +1452,8 @@ add_newdoc('numpy.core.multiarray', 'where', condition : array_like, bool When True, yield `x`, otherwise yield `y`. x, y : array_like, optional - Values from which to choose. `x` and `y` need to have the same - shape as `condition`. + Values from which to choose. `x`, `y` and `condition` need to be + broadcastable to some shape. Returns ------- diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 632266310..c89b4097a 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -2145,8 +2145,8 @@ def fromfunction(function, shape, **kwargs): The function is called with N parameters, where N is the rank of `shape`. Each parameter represents the coordinates of the array varying along a specific axis. For example, if `shape` - were ``(2, 2)``, then the parameters in turn be (0, 0), (0, 1), - (1, 0), (1, 1). + were ``(2, 2)``, then the parameters would be + ``array([[0, 0], [1, 1]])`` and ``array([[0, 1], [0, 1]])`` shape : (N,) tuple of ints Shape of the output array, which also determines the shape of the coordinate arrays passed to `function`. diff --git a/numpy/ma/core.py b/numpy/ma/core.py index 04290e4f3..3ce44caf7 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -6958,8 +6958,8 @@ def where(condition, x=_NoValue, y=_NoValue): The condition to meet. For each True element, yield the corresponding element from `x`, otherwise from `y`. x, y : array_like, optional - Values from which to choose. `x` and `y` need to have the same shape - as condition, or be broadcast-able to that shape. + Values from which to choose. `x`, `y` and `condition` need to be + broadcastable to some shape. Returns ------- -- cgit v1.2.1