New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VIF: module 'numpy' has no attribute 'MachAr' #8731
Comments
which version of statsmodels are your using? I don't find any "machar" in the source code using file search |
I am using statsmodels 0.12.2 I tried downgrading numpy version, and I am no longer facing this issue. |
dependencies are python -> numpy -> scipy -> pandas -> statsmodels compatibility requires that they are released at around the same time or have age sequence the same as dependency sequence. |
check this https://numpy.org/doc/stable/release/1.22.0-notes.html#the-np-machar-class-has-been-deprecated The np.MachAr class has been deprecated (gh-20201) |
Unfortunately downgrading numpy is not working anymore or at least not for me (in databricks), what version did you specify? |
Describe the bug
This is a new bug that I am facing in Variance Inflation Factor. With numpy 1.24 and above, package throws above mentioned error:
The traceback points at this line:
EPS = np.MachAr().eps
from statsmodels/tools/numdiff.py
Code Sample, a copy-pastable example if possible
Note: As you can see, there are many issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates.
Note: Please be sure you are using the latest released version of
statsmodels
, or a recent build ofmain
. If your problem has been fixed in an unreleased version, you might be able to usemain
until a new release occurs.Note: If you are using a released version, have you verified that the bug exists in the main branch of this repository? It helps the limited resources if we know problems exist in the current main branch so that they do not need to check whether the code sample produces a bug in the next release.
If the issue has not been resolved, please file it in the issue tracker.
Expected Output
A clear and concise description of what you expected to happen.
Output of
import statsmodels.api as sm; sm.show_versions()
[paste the output of
import statsmodels.api as sm; sm.show_versions()
here below this line]The text was updated successfully, but these errors were encountered: