def _unpack_simple(fid, dtype, out_dtype):
 dtype = np.dtype(dtype)
 string = fid.read(dtype.itemsize)
 out = np.fromstring(string, dtype=dtype).astype(out_dtype)
 if (len(out) > 0):
  out = out[0]
 return out

def _unpack_simple ( fid , dtype , out_dtype ) : dtype = np . dtype ( dtype ) string = fid . read ( dtype . itemsize ) out = np . fromstring ( string , dtype = dtype ) . astype ( out_dtype ) if ( len ( out ) > 0 ) : out = out [ 0 ] return out
unpack a numpy type .