def add_record(self, kper, index, values):
    assert ((len(index) + len(values)) == len(self.dtype)), ('MfList.add_record() error: length of index arg +' + 'length of value arg != length of self dtype')
    if (kper in list(self.__data.keys())):
        if (self.vtype[kper] == int):
            self.__data[kper] = self.get_empty(1)
            self.__vtype[kper] = np.recarray
        elif (self.vtype[kper] == str):
            d = self.__fromfile(self.data[kper])
            d.resize(d.shape[0], d.shape[1])
            self.__data[kper] = d
            self.__vtype[kper] = np.recarray
        elif (self.vtype[kper] == np.recarray):
            self.__data[kper] = np.append(self.__data[kper], self.get_empty(1))
    else:
        self.__data[kper] = self.get_empty(1)
        self.__vtype[kper] = np.recarray
    rec = list(index)
    rec.extend(list(values))
    try:
        self.__data[kper][(- 1)] = tuple(rec)
    except Exception as e:
        raise Exception((('MfList.add_record() error: adding record to ' + 'recarray: ') + str(e)))
def add_record(self, kper, index, values):
    assert ((len(index) + len(values)) == len(self.dtype)), ('MfList.add_record() error: length of index arg +' + 'length of value arg != length of self dtype')
    if (kper in list(self.__data.keys())):
        if (self.vtype[kper] == int):
            self.__data[kper] = self.get_empty(1)
            self.__vtype[kper] = np.recarray
        elif (self.vtype[kper] == str):
            d = self.__fromfile(self.data[kper])
            d.resize(d.shape[0], d.shape[1])
            self.__data[kper] = d
            self.__vtype[kper] = np.recarray
        elif (self.vtype[kper] == np.recarray):
            self.__data[kper] = np.append(self.__data[kper], self.get_empty(1))
    else:
        self.__data[kper] = self.get_empty(1)
        self.__vtype[kper] = np.recarray
    rec = list(index)
    rec.extend(list(values))
    try:
        self.__data[kper][(- 1)] = tuple(rec)
    except Exception as e:
        raise Exception((('MfList.add_record() error: adding record to ' + 'recarray: ') + str(e)))