numpy power ValueError: Integers to negative integer powers are not allowed.

# numpy.power(x1,x2)
numpy.power(1,-1)

这样做是不允许的,只需把x1 = float(x1)就行

你可能感兴趣的:(python)