test_deprecations.py 706 B

12345678910111213141516171819202122
  1. """Test deprecation and future warnings.
  2. """
  3. from __future__ import division, absolute_import, print_function
  4. import numpy as np
  5. from numpy.testing import assert_warns
  6. def test_qr_mode_full_future_warning():
  7. """Check mode='full' FutureWarning.
  8. In numpy 1.8 the mode options 'full' and 'economic' in linalg.qr were
  9. deprecated. The release date will probably be sometime in the summer
  10. of 2013.
  11. """
  12. a = np.eye(2)
  13. assert_warns(DeprecationWarning, np.linalg.qr, a, mode='full')
  14. assert_warns(DeprecationWarning, np.linalg.qr, a, mode='f')
  15. assert_warns(DeprecationWarning, np.linalg.qr, a, mode='economic')
  16. assert_warns(DeprecationWarning, np.linalg.qr, a, mode='e')