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

Please convert this notebook to Python 3 #2

Open
CBrauer opened this issue Aug 29, 2017 · 3 comments
Open

Please convert this notebook to Python 3 #2

CBrauer opened this issue Aug 29, 2017 · 3 comments

Comments

@CBrauer
Copy link

CBrauer commented Aug 29, 2017

Please convert this notebook to Python 3. I get errors in print statements and plt.errorbar.

@vsmolyakov
Copy link
Owner

It may be helpful to use the print function from the future module:
from __future__ import print_function

I was using version 2.0.2 of matplotlib, perhaps updating matplotlib can solve the plt.errorbar problem:
sudo pip3 install --upgrade matplotlib

@ClaudeCoulombe
Copy link

ClaudeCoulombe commented Sep 4, 2017

Conversion to Python 3 was very easy...

You've just to add parenthesis to print statement.
print("Accuracy: %.2f (+/- %.2f) [%s]" %(scores.mean(), scores.std(), label))

And enlist some maps for the new errorbar API
num_est = list(map(int, np.linspace(1,100,20)))

The only non-critical problem was mysterious warnings that was not able to figure exactly the origin although I've updated, mlxtend, matplotlib and numpy... Anyway, I would not spend a lot of time on more cosmetic issue.

« MaskedArrayFutureWarning: In the future the default for ma.maximum.reduce will be axis=0, not the current None, to match np.maximum.reduce. Explicitly pass 0 or None to silence this warning.
return self.reduce(a) »

Thank you Vadim!

@vsmolyakov
Copy link
Owner

Thanks @ClaudeCoulombe for the detailed solution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants