Home > Software design >  cannot import name 'pinv2' from 'scipy.linalg'
cannot import name 'pinv2' from 'scipy.linalg'

Time:01-06

I want to import pinv2 from scipy.linalg. But I get an error that ImportError: cannot import name 'pinv2' from 'scipy.linalg' (C:\Users\me\Anaconda3\lib\site-packages\scipy\linalg_init_.py)

import numpy as np
from scipy.linalg import pinv2, inv

can anywan please let me know how I can fix it or import pinv2?

CodePudding user response:

scipy.linalg.pinv2 was deprecated with version 1.7 and removed with version 1.9. The functionality has been subsumed by scipy.linalg.pinv.

See changelogs.

  • Related