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

Python3 compatibility #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Python3 compatibility #57

wants to merge 1 commit into from

Conversation

MechCoder
Copy link

Python3 Support

@MechCoder
Copy link
Author

I am trying to add Python3 Support, but I'm stuck at this point.

File "/usr/local/lib/python3.4/dist-packages/spearmint-0.1-py3.4.egg/spearmint/grids/sobol.py", line 247, in to_binary
return np.ones_like(temp) & temp
TypeError: ufunc 'bitwise_and' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

I am unable to proceed further without understanding what this part of the code does.

@JasperSnoek any clue?

@MechCoder
Copy link
Author

Ok, I installed it in Python 2. So I'll try to figure it out.

@redst4r
Copy link

redst4r commented May 31, 2016

@MechCoder: the above error is due to an integer division (py2) vs float division (py3)
X[:,np.newaxis] // 2**np.arange(bits-1,-1,-1, dtype=np.uint32)

i fixed a couple of other issues for python 3 compatibility, see #70

@redst4r redst4r mentioned this pull request Jun 2, 2016
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.

None yet

2 participants