diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-09-28 15:27:23 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-09-28 15:27:23 -0600 |
commit | e6dbcead884019bd2aee802f78c41f6a9c46cd61 (patch) | |
tree | 5839c4d94f311a960b9491c6eac019d47a48dfe9 /numpy | |
parent | f43d691fd0b9b4f416b50fba34876691af2d0bd4 (diff) | |
parent | 032951dc09ae110f3260cf29abf9d584bda262a7 (diff) | |
download | numpy-e6dbcead884019bd2aee802f78c41f6a9c46cd61.tar.gz |
Merge pull request #6384 from anntzer/fill-default-dtype-futurewarning
Add tests.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/tests/test_deprecations.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/numpy/core/tests/test_deprecations.py b/numpy/core/tests/test_deprecations.py index 3e76409c5..e3aea7efb 100644 --- a/numpy/core/tests/test_deprecations.py +++ b/numpy/core/tests/test_deprecations.py @@ -374,5 +374,15 @@ class TestBooleanIndexShapeMismatchDeprecation(): arr.__getitem__, (slice(None), index)) +class TestFullDefaultDtype: + """np.full defaults to float when dtype is not set. In the future, it will + use the fill value's dtype. + """ + + def test_full_default_dtype(self): + assert_warns(FutureWarning, np.full, 1, 1) + assert_warns(FutureWarning, np.full, 1, None) + + if __name__ == "__main__": run_module_suite() |