Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

module 'numpy' has no attribute 'MachAr'?

I have a question. When I import 'variance_inflation_factor ' from 'statsmodels.stats.outliers_influence', I get ' module 'numpy' has no attribute 'MachAr'' error, what is the reason?

I once executed this code in a project and it worked without any problems, but it gives this error for subsequent projects

like image 948
reza semyari Avatar asked Apr 20 '26 00:04

reza semyari


1 Answers

I had this issue while running import statsmodels.api as sm. The issue was happening with numpy==1.24.2. Downgrading it to 1.23 solved the issue for me. I have not tested newer versions tbh, so another one might work as well.

like image 98
erykml Avatar answered Apr 28 '26 10:04

erykml