コード例 #1
0
ファイル: prlcnscdl.py プロジェクト: wangjinjia1/sporco
    def getitstat(self):
        """Get iteration stats as named tuple of arrays instead of array
        of named tuples.
        """

        return transpose_ntpl_list(self.itstat)
コード例 #2
0
 def test_02(self):
     nt = collections.namedtuple('NT', ('A', 'B', 'C'))
     lst = [nt(0, 1, 2), nt(3, 4, 5)]
     lsttp = array.transpose_ntpl_list(lst)
     assert lst[0].A == lsttp.A[0]