-
Notifications
You must be signed in to change notification settings - Fork 147
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
Line 77, x is not defined error #9
Comments
Looks like you are trying to run the code in Python3. You have to change the lines 77 and 79 to: rots = [Quaternion.from_v_theta(np.eye(3)[0], theta) Furthermore in file projection.py you have to change line 160 to: trans = list(range(1, dproj.ndim)) + [0] After these two changes the code runs fine. I will try to commit the changes to the repository. |
See the fork https://github.com/cadrians/MagicCube It runs fine in Python3. |
Thank you. I did find those changes and make them.
However, when I run this in ipython on a Mac, it does not respond to the key strokes to rotate edges. What backend do you use?
Interestingly, if I put it into a Jupyter Notebook it runs as expected—except that the 3D rotation by dragging the mouse is very slow to respond.
On Jan 16, 2018, at 5:49 AM, Adrian <[email protected]> wrote:
Looks like you are trying to run the code in Python3.
You have to change the lines 77 and 79 to:
rots = [Quaternion.from_v_theta(np.eye(3)[0], theta)
for theta in (np.pi / 2, -np.pi / 2)]
rots += [Quaternion.from_v_theta(np.eye(3)[1], theta)
for theta in (np.pi / 2, -np.pi / 2, np.pi, 2 * np.pi)]
Furthermore in file projection.py you have to change line 160 to:
trans = list(range(1, dproj.ndim)) + [0]
After these two changes the code runs fine.
I will try to commit the changes to the repository.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#9 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AEVrtRZXowb6GvDo-gh3yauAxJT8KcTqks5tLH7JgaJpZM4RPRoA>.
|
if it's fixed now, close this. |
I downloaded the code and tried to run it. I am getting
Traceback (most recent call last):
File "code/cube_interactive.py", line 46, in
class Cube:
File "code/cube_interactive.py", line 77, in Cube
for theta in (np.pi / 2, -np.pi / 2)]
File "code/cube_interactive.py", line 77, in
for theta in (np.pi / 2, -np.pi / 2)]
NameError: name 'x' is not defined
Any idea why?
The text was updated successfully, but these errors were encountered: