LoginSignup
0
0

More than 5 years have passed since last update.

numpyでMismatch between array dtype (***) and format specifier (***)

Posted at

エラー文

with open("filename", 'a') as f:
    numpy.savetxt(f, data)

とした場合の一例が以下

Mismatch between array dtype ('float64') and format specifier ('%10.5f)

対処

with open("filename", 'ab') as f:
    numpy.savetxt(f, data)

バイナリモードを付け加えるとなんと動いた。
理由が解明できない対処だが目的は達成したのでまずはメモしときます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0