예제 #1
0
    def testunion( self ):
        
        s1 = PSpace('adc', a=1)
        s2 = PSpace('adc', b=2)
        s3 = PSpace('adc', a=1, b=2)
        s4 = PSpace('adc', a=UnknownValue)

        self.failUnlessEqual( s1.union( s2 ), PSpace('adc') )
        
        self.failUnlessEqual( s1.union( s2, s3 ), PSpace('adc') )
        
        self.failUnlessEqual( s1.union( s3 ), s1 )
        
        self.failUnlessEqual( s1.union( s4 ), s1 )
예제 #2
0
 def coalesce(self):
     slist = self.ravel().tolist()
     return PSpace.union(*slist)