[python] Numpy AttributeError: 'float' object has no attribute 'exp'