Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第一类数据读取过程中遇到的bug #42

Open
Yes-Maaan opened this issue Nov 15, 2023 · 0 comments
Open

第一类数据读取过程中遇到的bug #42

Yes-Maaan opened this issue Nov 15, 2023 · 0 comments

Comments

@Yes-Maaan
Copy link

在读取第一类数据时,出现如下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)):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant