这是我的二维 numpy 数组:
returns = np.array([
[ -4.78878057e-03 9.79090927e-03 -2.06883581e-03 -1.25786164e-02]
[ 5.79128440e-03 -2.85791008e-03 1.69555388e-03 -5.63798220e-02]
[ 5.73427375e-05 2.45043133e-02 8.55025651e-03 -4.53257790e-02]
[ 6.75441635e-03 8.70168484e-03 1.07547532e-02 -1.36919315e-01]
[ 6.68332655e-03 6.76498174e-03 3.08225775e-03 0.00000000e+00]])
当我试图计算每列的 STD 时:
print np.std(returns, axis=1)
我收到以下错误:
ValueError: 'axis' entry is out of bounds
我该如何解决?