This does not work on python3. Use functools.reduce if you need it. Or np.prod ?