Finding slope of a straight line using numpy polyfit, where some values are zero

前端 未结 0 939
执笔经年
执笔经年 2021-01-19 05:28

I tried to calculate the slope of a graph like this.

x= [1,2,3,4,5]
y= [1,0,5,0,8]

s, i = numpy.polyfit(np.log(x), np.log(y), 1)

But it is not w

相关标签:
回答
  • 消灭零回复
提交回复
热议问题