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

Cannot save data with data type numpy.float64 in yaml file. #180

Closed
aramoto99 opened this issue Jan 5, 2023 · 2 comments · Fixed by #181
Closed

Cannot save data with data type numpy.float64 in yaml file. #180

aramoto99 opened this issue Jan 5, 2023 · 2 comments · Fixed by #181

Comments

@aramoto99
Copy link
Collaborator

aramoto99 commented Jan 5, 2023

データ型がnumpy.float64のデータをyaml形式で保存し,yaml.load()で呼出すとエラーが発生する.
[参考]
https://stackoverflow.com/questions/40691311/save-results-in-yaml-file-with-python

[対処予定]

  1. numpy.float64をstr()し,yamlで保存
  2. yaml読み込み時に yaml.Unsafeloader を 使用

2で対応予定.

@styamamoto
Copy link
Contributor

python_local で実行した場合

  • .hp ファイル群は正常に生成される,
  • final_result.result ファイルが文字化け?した状態で生成される,

という現象を確認しました.

@styamamoto
Copy link
Contributor

yaml.load() する際に Loader を yaml.Unsafeloader にする方法もあるみたいです.
[参考]
yaml/pyyaml#286

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

Successfully merging a pull request may close this issue.

2 participants