Skip to content

Conversation

@TimoFriedri
Copy link

Simple change for the print lines in python 3

Copy link

@cclauss cclauss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add from __future__ import print_function to the top of the import statements to get identical output in Python 3.

print time.time() - now
print ret.shape, ret.dtype
print(time.time() - now)
print(ret.shape, ret.dtype)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not quite right. When you are printing multiple values separated by a comma then you must from __future__ import print_function at the top of the import statements to get identical output in Python 2.

$ python2 -c "print 'a', 'b' ; print('a', 'b')"

a b
('a', 'b')

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

Successfully merging this pull request may close these issues.

2 participants