Skip to content

Instantly share code, notes, and snippets.

@mkacky
Created May 9, 2014 09:04
Show Gist options
  • Save mkacky/604e1c5ec3de87d446f6 to your computer and use it in GitHub Desktop.
Save mkacky/604e1c5ec3de87d446f6 to your computer and use it in GitHub Desktop.
#! /usr/bin/python
# -*- coding: utf-8 -*-
import numpy as np
vertical_data = np.loadtxt("vertical_data.txt")
## 表示例
# >>> vertical_data
# array([ 0., 1., 2., 3., 4., 5.])
np.savetxt("out_data_v.txt", vertical_data, fmt="%d")
## ファイル内容
# 0
# 1
# 2
# 3
# 4
# 5
horizonal_data = np.loadtxt("horizonal_data.txt")
## 表示例
# >>> horizonal_data
# array([ 0., 1., 2., 3., 4., 5.])
np.savetxt("out_data_h.txt", vertical_data, 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