#!/usr/bin/python import numpy as np struct = np.dtype([('i1',np.int32),('s','S8'),('i2',np.int32),('i3',np.int32),('f1',np.float64),('i4',np.int32)]) a = np.fromfile('to_be_read.dat',dtype=struct) print a print a[0] print a[0][4] print a['f1']