Skip to content

Instantly share code, notes, and snippets.

@mkacky
Created August 18, 2013 10:18
Show Gist options
  • Save mkacky/6260937 to your computer and use it in GitHub Desktop.
Save mkacky/6260937 to your computer and use it in GitHub Desktop.
test of cast
#! /usr/bin/python
# -*- coding: utf-8 -*-
import numpy as np
data = np.loadtxt("decimal.dat")
# 表示例
# >>> data
# array([ 12.4, 53.4, -2.6, 8.9, 11. ])
data.astype(int)
# 表示例
# >>> data
# array([12, 53, -2, 8, 11])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment