diff options
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index f18ab6336..5a1cbe9fc 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -282,7 +282,7 @@ def full(shape, fill_value, dtype=None, order='C'): ---------- shape : int or sequence of ints Shape of the new array, e.g., ``(2, 3)`` or ``2``. - fill_value : scalar + fill_value : scalar or array_like Fill value. dtype : data-type, optional The desired data-type for the array The default, None, means @@ -312,6 +312,10 @@ def full(shape, fill_value, dtype=None, order='C'): array([[10, 10], [10, 10]]) + >>> np.full((2, 2), [1, 2]) + array([[1, 2], + [1, 2]]) + """ if dtype is None: dtype = array(fill_value).dtype |