def __tofile(self, f, data):
    assert isinstance(data, np.recarray), ('MfList.__tofile() data arg ' + 'not a recarray')
    lnames = [name.lower() for name in self.dtype.names]
    d = data.copy()
    for idx in ['k', 'i', 'j', 'node']:
        if (idx in lnames):
            d[idx] += 1
    if self.__binary:
        dtype2 = []
        for name in self.dtype.names:
            dtype2.append((name, np.float32))
        dtype2 = np.dtype(dtype2)
        d = np.array(d, dtype=dtype2)
        d.tofile(f)
    else:
        np.savetxt(f, d, fmt=self.fmt_string, delimiter='')
def __tofile(self, f, data):
    assert isinstance(data, np.recarray), ('MfList.__tofile() data arg ' + 'not a recarray')
    lnames = [name.lower() for name in self.dtype.names]
    d = data.copy()
    for idx in ['k', 'i', 'j', 'node']:
        if (idx in lnames):
            d[idx] += 1
    if self.__binary:
        dtype2 = []
        for name in self.dtype.names:
            dtype2.append((name, np.float32))
        dtype2 = np.dtype(dtype2)
        d = np.array(d, dtype=dtype2)
        d.tofile(f)
    else:
        np.savetxt(f, d, fmt=self.fmt_string, delimiter=)