当我运行以下函数时
def chicalcultor(theoretical, observed, errors):
chi = 0
for num in range(580):
chi += ((pow(theoretical[num] - observed[num], 2)) / (pow(errors[num], 2)))
return chi
我收到此错误
5 for num in range(580):
----> 6 chi += ((pow(theoretical[num] - observed[num], 2)) / (pow(errors[num], 2)))
7 return chi
8
IndexError: index 0 is out of bounds for axis 0 with size 0
谁能告诉我我哪里出错了?