Skip to content
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

mstats.kurtosistest is incorrectly converting to float, and fails to run (Trac #1769) #2288

Closed
scipy-gitbot opened this issue Apr 25, 2013 · 3 comments
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected good first issue Good topic for first contributor pull requests, with a relatively straightforward solution Migrated from Trac scipy.stats
Milestone

Comments

@scipy-gitbot
Copy link

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

@scipy-gitbot
Copy link
Author

trac user natelust wrote on 2012-11-05

Silly me, I should have said this is in the mstats_basic.py file

@scipy-gitbot
Copy link
Author

@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?

@rgommers
Copy link
Member

Fixed in gh-3008.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected good first issue Good topic for first contributor pull requests, with a relatively straightforward solution Migrated from Trac scipy.stats
Projects
None yet
Development

No branches or pull requests

2 participants