You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "C:/Users/User/Dropbox/Programs/p5play.py", line 1, in <module>
from p5 import *
File "C:\Python34\lib\site-packages\p5\__init__.py", line 19, in <module>
from .sketch import *
File "C:\Python34\lib\site-packages\p5\sketch\__init__.py", line 19, in <module>
from .base import *
File "C:\Python34\lib\site-packages\p5\sketch\base.py", line 29, in <module>
from ..opengl import renderer
File "C:\Python34\lib\site-packages\p5\opengl\__init__.py", line 19, in <module>
from .renderer import *
File "C:\Python34\lib\site-packages\p5\opengl\renderer.py", line 33, in <module>
from ..pmath import matrix
File "C:\Python34\lib\site-packages\p5\pmath\__init__.py", line 20, in <module>
from .vector import *
File "C:\Python34\lib\site-packages\p5\pmath\vector.py", line 321
return np.arccos( (self @ other) / (self.magnitude * other.magnitude))
^
SyntaxError: invalid syntax
p5 version:
Newest version
Python version:
Python 3.4.0
Operating System:
Windows 10
The text was updated successfully, but these errors were encountered:
The syntax of using '@' for matrix multiplication was introduced in Python 3.5.
Also, this problem also includes issues due to tuple unpacking, which was introduced after Python 3.4.
As @abhikpal pointed out, the script will run properly in newer versions of Python.
Maybe we will have to include Python 3.5 in the dependencies of p5py.
abhikpal
changed the title
Example throws an error
matmul operator on Python version <= 3.4
May 1, 2018
abhikpal
changed the title
matmul operator on Python version <= 3.4
matmul operator on Python version <= 3.4 (rel: #18)
May 1, 2018
Test script:
Expected behavior:
The video in the README
Actual behavior
An error is thrown.
Errors produced (if any):
p5 version:
Newest version
Python version:
Python 3.4.0
Operating System:
Windows 10
The text was updated successfully, but these errors were encountered: