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
fix numpy issue #3584 #4290
fix numpy issue #3584 #4290
Conversation
line 731 midx = np.where(self.groupsunique==comparison_name)[0] changed to midx = np.where(self.groupsunique==comparison_name)[0][0]
The tukeyhsd tests are in this module https://github.com/statsmodels/statsmodels/blob/master/statsmodels/stats/tests/test_pairwise.py Based on my file search, there are currently no unit tests for the plot method. specific to plot tests: matplotlib is not required, so the test needs to be skipped if matplotlib is not available. You can look at other plot test to see how this is done. |
@josef-pkt Can you please check this sample code |
Looks good, |
@josef-pkt |
sounds good, (Initially I thought we only add it to one of the test classes to keep test time lower, but it makes sense to check this for all cases, currently there are 5) |
@josef-pkt |
You only need to add it to the CheckTuckeyHSDMixin class, as you said. Any
You already have the fix in this PR, but if you run the unit tests without this fix after adding the test to CheckTuckeyHSDMixin, then a test should fail. If no test fails, then the current case/bug needs an additional unit test pytest (or nosetest) is convenient to run the unit tests of just one test module by specifying the module name, e.g. on the commandline |
@josef-pkt
But I think there won't be any test fails as there was no issue with the plot function, instead it was an issue with numpy. I have attached the screenshot, For that case, I have created a test class at |
@abhijeetpanda12 Can you rebase this on current master? Otherwise, I take over the fix. |
this is now obselete, I added the fix to my PR to finish up @abhijeetpanda12 Thanks for finding the bug-fix. |
@josef-pkt I was trying to rebase this on the current master. But you have already fixed it in #4380 |
@abhijeetpanda12 There is nothing for you to do anymore. I will close this PR when I merge my #4380 |
fixes #3584
line 731 in statsmodels/sandbox/stats/multicomp.py
midx = np.where(self.groupsunique==comparison_name)[0]
changed to
midx = np.where(self.groupsunique==comparison_name)[0][0]