python - TypeError: ttest_1samp() 得到了一个意外的关键字参数“alternative”
问题描述
我不断收到此错误消息:
TypeError: ttest_1samp() got an unexpected keyword argument 'alternative'
我的代码是:
test_stat, p_value = ttest_1samp(FF['Time'], popmean=40, alternative='greater')
print('the p-value is', p_value)
解决方案
更新 scipy 版本应该有帮助:
pip install --upgrade scipy
推荐阅读
- perl - 使用 NonStop 调试器选项时如何将 perl 脚本的调试跟踪重定向到文件?
- c++ - POD 和非 POD 类之间的性能差异
- swift - 如何写下缩短的 if 条件?
- git - 克隆更新的存储库?
- javascript - getElementsByClassName 在条件下不起作用
- netsuite - Netsuite 2.0 Rest API 调用在获取自定义段字段时出错
- java - ResultSet 已关闭,仅打印第一个“SUBKATEGORI”
- google-app-engine - 允许 Cloud NAT 与 App Engine 防火墙通信
- ios - 从 XIB 加载视图作为滚动视图的子视图
- php - 数天“忘记”最后一天