kdavies4 / natu

Natural units in Python
http://kdavies4.github.io/natu/
Other
33 stars 5 forks source link

Error at start of tutorial on Win8 with Py3.4.3 #20

Closed Navier8 closed 9 years ago

Navier8 commented 9 years ago

Error output

C:\Users\Philip>py Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (In tel)] on win32 Type "help", "copyright", "credits" or "license" for more information.

from natu.units import m m ScalarUnit m with dimension L (prefixable) length=10m length Traceback (most recent call last): File "", line 1, in File "C:\Python34\lib\site-packages\natu-0.1.1-py3.4.egg\natu\core.py", line 8 23, in repr return format(self, 'g') File "C:\Python34\lib\site-packages\natu-0.1.1-py3.4.egg\natu\core.py", line 3 57, in wrapped unit = unitspace(display_unit) File "C:\Python34\lib\site-packages\natu-0.1.1-py3.4.egg\natu\core.py", line 1 374, in call return reduce(lambda x, y: x \ y, factors) NameError: name 'reduce' is not defined

Navier8 commented 9 years ago

It would appear that including 'from functools import reduce' in 'core.py' solves this problem Python 3.4.3

Phil