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
I'm fairly new to Python and tried to use your Vector package. I'm a fan of linear algebra. I can't seem to get your examples to work though.
v1 = Vector(1, 2, 3)
print(v1.magnitude())
Yields the below error. I'm on Python 3.6
File "C:\Python36-32\lib\site-packages\vectors\vectors.py", line 52, in magnitude
return (math.sqrt(reduce(lambda x, y: x+y,
NameError: name 'reduce' is not defined
Thanks
Manny
The text was updated successfully, but these errors were encountered:
The issue is that the "reduce" has been moved into functools library.
It is just necessary to add in the file vectors.py the following import command at the beginning:
I'm fairly new to Python and tried to use your Vector package. I'm a fan of linear algebra. I can't seem to get your examples to work though.
Yields the below error. I'm on Python 3.6
Thanks
Manny
The text was updated successfully, but these errors were encountered: