Skip to content

Instantly share code, notes, and snippets.

@mkacky
Created May 9, 2014 09:08
Show Gist options
  • Save mkacky/7f00e7ea7de87fce10b3 to your computer and use it in GitHub Desktop.
Save mkacky/7f00e7ea7de87fce10b3 to your computer and use it in GitHub Desktop.
#! /usr/bin/python
# -*- coding: utf-8 -*-
import numpy as np
data = np.loadtxt("vertical_data.txt")
## 表示例
# >>> vertical_data
# array([ 0., 1., 2., 3., 4., 5.])
np.savetxt("out_data.dat", data[None], fmt="%d")
## ファイル内容
# 0 1 2 3 4 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment