-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
在读取第一类数据时,出现如下bug:
File D:\Software\Miniconda3\envs\data_get\Lib\site-packages\nmc_met_io\read_micaps.py:84, in read_micaps_1(fname, limit)
82 if (len(txt) % 24) == 0:
83 txt = np.array(txt)
---> 84 txt.shape = [number, 24]
85 else:
86 txt = np.array(txt)
ValueError: cannot reshape array of size 80184 into shape (3084,24)
原因是number=80184既是24也是26的公倍数,我的文件中有26列数据。因此应该将txt的shape变为(3084,26)。
将报错描述中的“if (len(txt) % 24) == 0: ”代码修改如下,即可正常运行
if (len(txt) % 24 == 0) & (number * 24 == len(txt)):
Yes-Maaan
Metadata
Metadata
Assignees
Labels
No labels