python SyntaxError:解析时出现意外的EOF,如果其他情况

问题描述 投票:0回答:1

我正在尝试测试

H0:mu1-mu2 = 0

H1:mu1-mu2≠0

假设,当我运行代码时,我得到了解析错误时出现意外的EOF。

from scipy.stats import kruskal
mu1=np.random.normal(70, 10, 25)
mu2=np.random.normal(70, 10, 35)
stat,p=kruskal(mu1,mu2)
alpha=0.05
print('stat=%.3f, p=%.3f' % (stat, p))
if p >= 0.05:
    print("H0 hypothesis is accepted")
else:
    print("H0 hypothesis is rejected")
python
1个回答
0
投票

代码似乎正在运行,请检查代码前半部分是否具有不匹配的括号,或者只是尝试重新启动内核。

© www.soinside.com 2019 - 2024. All rights reserved.