test_deprecations.py 640 B

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