如何在numpy数组列表中同时进行相同的计算?

2024-10-02 00:43:58 发布

您现在位置:Python中文网/ 问答频道 /正文

我想用axis=1规范化包含不同大小的2D NumPy数组的列表。
我的NumPy数组列表如下:

enter image description here

首先,我试着用numpy.hstack得到平均值和性病。你知道吗

成功获取以下操作时出错:

mean,std = get_mean_std(uttrSpectro) # get_mean_std : my function which returns mean and std
uttrSpectro = (uttrSpectroList-mean)/std
Error Message : could not broadcast input array from shape (801,284) into shape (801)

如果没有for循环,如何进行此计算?你知道吗


Tags: numpy列表getmy数组mean规范化平均值

热门问题