0
0

More than 3 years have passed since last update.

numpyでファイルに要素を書き出し確認したい。

Last updated at Posted at 2020-10-10

配列の結合などで、思わぬエラーになり、ファイルに要素を書き出して確認したいがデフォルトではfloatなのでうまくいかない。

np.savetxtで、fmt="%d"を指定して書き出す。

np.savetxt("a.csv", target, fmt = "%d")
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