Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python scipy.stats.binned_统计值错误:要解压缩的值太多(预期为2个)_Python_Scipy - Fatal编程技术网

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,)