如何解决此错误axiserror:轴1超出了维1的数组的范围 [英] How do I solve this error axiserror: axis 1 is out of bounds for array of dimension 1

查看:2227
本文介绍了如何解决此错误axiserror:轴1超出了维1的数组的范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Traceback (most recent call last):
  File "<pyshell#18>", line 1, in <module>
    result = waipy.cwt(data_norm, 1, 1, 0.25, 2, 4/0.25, alpha, 6, mother='Morlet')
  File "/usr/local/lib/python2.7/dist-packages/waipy/cwt/wavetest.py", line 75, in cwt
    ondaleta,wave,period,scale,coi,f = lib_wavelet.wavelet(data,dt,mother,param)#,pad,dj,s0,j1,mother,param)
  File "/usr/local/lib/python2.7/dist-packages/waipy/cwt/lib_wavelet.py", line 132, in wavelet
    k = np.concatenate((k_pos,k_neg), axis =1)  			# vector of symmetric
AxisError: axis 1 is out of bounds for array of dimension 1





我尝试过:





What I have tried:

result = cwt(data_norm, 1, 1, 0.25, 2, 4/0.25, alpha, 6, mother='Morlet')

推荐答案

您的数组中只有1个项目,如错误消息中所述。数组元素从零开始寻址。
You only have 1 item in your array, as noted in the error message. Array elements are addressed starting at zero.


这篇关于如何解决此错误axiserror:轴1超出了维1的数组的范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆