Python scipy.stats.binned_统计值错误:要解压缩的值太多(预期为2个)
有关下列事项:Python scipy.stats.binned_统计值错误:要解压缩的值太多(预期为2个),python,scipy,Python,Scipy,有关下列事项: import scipy as sp from scipy import stats statistic, bin_edges = sp.stats.binned_statistic(step_data, EG_data, bins=20) 我得到一个错误: 统计,bin_边=sp.stats.binned_统计(步骤数据,例如数据, 垃圾箱(20个) ValueError:要解压缩的值太多(应为2个) 但是,输入数组的尺寸似乎是正确的(对吗?): 有解决方案吗?函数bin
import scipy as sp
from scipy import stats
statistic, bin_edges = sp.stats.binned_statistic(step_data, EG_data, bins=20)
我得到一个错误:
统计,bin_边=sp.stats.binned_统计(步骤数据,例如数据,
垃圾箱(20个)
ValueError:要解压缩的值太多(应为2个)
但是,输入数组的尺寸似乎是正确的(对吗?):
有解决方案吗?函数
binned_statistic
返回3个值,而不是2个值:感谢您的快速响应,您的回答是正确的。我只是浏览了一下页面,错过了最后一个返回值,因为它不是粗体。函数binned_statistic
返回3个值,而不是2个值:感谢您的快速响应,您是正确的。我只是浏览了一下页面,没有看到最后返回的值,因为它不是粗体的。
step_data.shape
>> (6138,)
EG_data.shape
>> (6138,)