Skip to content

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.

2 participants