Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.10/site-packages/numpy/linalg/linalg.py: 75%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

8 statements  

1def __getattr__(attr_name): 

2 import warnings 

3 from numpy.linalg import _linalg 

4 ret = getattr(_linalg, attr_name, None) 

5 if ret is None: 

6 raise AttributeError( 

7 f"module 'numpy.linalg.linalg' has no attribute {attr_name}") 

8 warnings.warn( 

9 "The numpy.linalg.linalg has been made private and renamed to " 

10 "numpy.linalg._linalg. All public functions exported by it are " 

11 f"available from numpy.linalg. Please use numpy.linalg.{attr_name} " 

12 "instead.", 

13 DeprecationWarning, 

14 stacklevel=3 

15 ) 

16 return ret