pyJoules
pyJoules copied to clipboard
TypeError: reduce() of empty sequence with no initial value
Hi there,
I'm trying pyJoules in a linux docker (ubuntu 16.04) running on MacOS 10.13.6.
However, when I try to run a simple script about pyJoules (shown as below), I get error information saying "TypeError: reduce() of empty sequence with no initial value". Do you know how to solve this issue? Thanks!
This is the script:
from pyJoules.energy_meter import measure_energy @measure_energy def foo(num_itr=1000000): rst = 0 for i in range(num_itr): rst *= i
foo(100000000)
This is the error information:
Traceback (most recent call last):
File "pyJoules_test.py", line 10, in