-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
ENH: add dtype arg to stats.mstats.gmean and stats.mstats.hmean #3302
Conversation
@@ -58,6 +58,11 @@ def test_1D(self): | |||
desired1 = mstats.gmean(a,axis=-1) | |||
assert_almost_equal(actual, desired1, decimal=14) | |||
|
|||
actualdt = mstats.gmean(a, dtype=np.float128) | |||
desireddt = np.power(1*2*3,1./3.).astype(np.float128) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some underscores? actual_dt
and desider_dt
is more readable. also in the test for hmean
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and some spaces in the power
call for PEP8 compat
Actually, |
So I import them in mstats, keep the tests. Shall I also keep them in |
Not needed I think, it's only kept in that namespace for backwards compat. |
…gmean and hmean TST: test correct dtype handling in masked_array case in scipy.stats.gmean and hmean fixes scipy#3196
Done. |
OK merged in a8abcfb. I fixed two issues: use |
Thanks Andreas. |
fixes #3196