diff options
author | Matti Picus <matti.picus@gmail.com> | 2020-01-16 07:19:31 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-16 07:19:31 +1100 |
commit | 723939476123902b044b6148f6905bc787ec07f5 (patch) | |
tree | 094778e1ac75fea0f623557871454f6ee12a8616 /numpy/core/numeric.py | |
parent | b6bc0941d4f07310456079ab2497c3d1bde4a5e7 (diff) | |
parent | cd7aa18d41eb7d8c9c62633d8227567a98d44176 (diff) | |
download | numpy-723939476123902b044b6148f6905bc787ec07f5.tar.gz |
Merge pull request #15286 from haojin2/patch-1
DOC: Update ``np.full`` docstring.
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 |