def getitstat(self): """Get iteration stats as named tuple of arrays instead of array of named tuples. """ return util.transpose_ntpl_list(self.itstat)
def test_02(self): nt = collections.namedtuple('NT', ('A', 'B', 'C')) lst = [nt(0, 1, 2), nt(3, 4, 5)] lsttp = util.transpose_ntpl_list(lst) assert lst[0].A == lsttp.A[0]
def getitstat(self): """Get iteration stats as named tuple of arrays instead of array of named tuples. """ return util.transpose_ntpl_list(self.itstat)
def test_02(self): nt = collections.namedtuple('NT', ('A', 'B', 'C')) lst = [nt(0, 1, 2), nt(3, 4, 5)] lsttp = util.transpose_ntpl_list(lst) assert lst[0].A == lsttp.A[0]