Use np.prod instead of reduce (fix for Py 3.2)