def __init__(self, filename=None): super(Dataset, self).__init__() self.filename = filename if self.filename == None: self.filename = "data001.txt" pass if self.filename != None: self.control_list, self.probe_1_list, self.probe_2_list =\ file2lists(self.filename)
def __init__(self, filename=None): # super(Dataset, self).__init__() super().__init__() self.filename = filename if self.filename == None: self.control_list, self.probe_1_list, self.probe_2_list = [], [], [] else: self.control_list, self.probe_1_list, self.probe_2_list =\ file2lists(self.filename)
def __init__(self, filename = None): super(Dataset, self).__init__() self.filename = filename self.control_list = [] self.probe_1_list = [] self.probe_2_list = [] if self.filename is None: self.filename = "data001.txt" if self.filename is not None: self.control_list, self.probe_1_list, self.probe_2_list =\ file2lists(self.filename)
def add2lst(filename, t_max): """ :param filename: name of file in directory :type filename: str :param t_max: max value of time, computed in other function :type t_max: int """ cl, p1, p2 = file2lists(filename) for i in range(len(cl)): if (i % 3 == 2): cl[i] += (t_max) for j in range(len(p1)): if (j%2 == 1): p1[j] += (t_max) for k in range(len(p2)): if (k % 2 == 1): p2[k] += (t_max) return cl, p1, p2