annotate DEPENDENCIES/mingw32/Python27/Lib/site-packages/numpy/linalg/tests/test_deprecations.py @ 133:4acb5d8d80b6
tip
Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author |
Chris Cannam |
date |
Tue, 30 Jul 2019 12:25:44 +0100 |
parents |
2a2c65a20a8b |
children |
|
rev |
line source |
Chris@87
|
1 """Test deprecation and future warnings.
|
Chris@87
|
2
|
Chris@87
|
3 """
|
Chris@87
|
4 import numpy as np
|
Chris@87
|
5 from numpy.testing import assert_warns, run_module_suite
|
Chris@87
|
6
|
Chris@87
|
7
|
Chris@87
|
8 def test_qr_mode_full_future_warning():
|
Chris@87
|
9 """Check mode='full' FutureWarning.
|
Chris@87
|
10
|
Chris@87
|
11 In numpy 1.8 the mode options 'full' and 'economic' in linalg.qr were
|
Chris@87
|
12 deprecated. The release date will probably be sometime in the summer
|
Chris@87
|
13 of 2013.
|
Chris@87
|
14
|
Chris@87
|
15 """
|
Chris@87
|
16 a = np.eye(2)
|
Chris@87
|
17 assert_warns(DeprecationWarning, np.linalg.qr, a, mode='full')
|
Chris@87
|
18 assert_warns(DeprecationWarning, np.linalg.qr, a, mode='f')
|
Chris@87
|
19 assert_warns(DeprecationWarning, np.linalg.qr, a, mode='economic')
|
Chris@87
|
20 assert_warns(DeprecationWarning, np.linalg.qr, a, mode='e')
|
Chris@87
|
21
|
Chris@87
|
22
|
Chris@87
|
23 if __name__ == "__main__":
|
Chris@87
|
24 run_module_suite()
|