diff options
author | Antony Lee <anntzer.lee@gmail.com> | 2015-10-11 15:54:48 -0700 |
---|---|---|
committer | Antony Lee <anntzer.lee@gmail.com> | 2015-10-11 15:54:48 -0700 |
commit | 7978f3d422e24d1f92d626d19763e5b87193824e (patch) | |
tree | fcc1227363ff2666c8491f1f00dbbd6950396293 /numpy/core/numeric.py | |
parent | 2b7eefbe0b146e5d4d0be991eb197c2fc8489893 (diff) | |
download | numpy-7978f3d422e24d1f92d626d19763e5b87193824e.tar.gz |
DEP: Remove warning for `full` when dtype is set.
See @rkern's comment in #6382.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 5d4464ea7..5c0e27239 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -291,10 +291,10 @@ def full(shape, fill_value, dtype=None, order='C'): """ a = empty(shape, dtype, order) - if array(fill_value).dtype != a.dtype: + if dtype is None and array(fill_value).dtype != a.dtype: warnings.warn( - "in the future, full(..., {0!r}) will return an array of {1!r}". - format(fill_value, array(fill_value).dtype), FutureWarning) + "in the future, full({0}, {1!r}) will return an array of {2!r}". + format(shape, fill_value, array(fill_value).dtype), FutureWarning) multiarray.copyto(a, fill_value, casting='unsafe') return a |