Original ticket http://projects.scipy.org/scipy/ticket/1769 on 2012-11-05 by trac user natelust, assigned to unknown.
When using mstats.kurtosistest the following error is generated:
AttributeError: 'int' object has no attribute 'astype'
because of line 1628 n = a.count(axis=axis).astype(float)
This makes perfect sense as a would be an int, which has no astype method.
Suggest changing to:
n = np.float(a.count(axis=axis)
or the like
trac user natelust wrote on 2012-11-05
Silly me, I should have said this is in the mstats_basic.py file
@josef-pkt wrote on 2012-11-05
Yes that's a bug and the fix looks correct to me. (I'm using older numpy and scipy.)
breaks with any 1-dimensional array.
volunteers for pull requests, preferably with test case?
Fixed in gh-3008.