예제 #1
0
 def __repr__(self):  
     with printoptions(precision=4):
         if self.is_axis_aligned():
             type = 'axis aligned'
         elif self.is_affine():
             type = 'affine'
         elif self.is_uniform():
             type = 'uniform'
         else: 
             type = ''
         if type!='': 
             type = " (%s)"%type
         s = "Grid%dD %s: "%(int(self.ndim),type)
         s = s + "\n - space -------------------> " + str(self.space)
         s = s + "\n - shape -------------------> " + str(list(self.shape)) 
         s = s + "\n - min ---------------------> " + str(self.min()) 
         s = s + "\n - max ---------------------> " + str(self.max()) 
         s = s + "\n - span --------------------> " + str(self.span()) 
         s = s + "\n - center ------------------> " + str(self.center()) 
         s = s + "\n - mean dist from center: --> " + str(self.mean_dist_from_center()) 
         s = s + "\n"
     return s
예제 #2
0
파일: Core.py 프로젝트: lynch829/occiput
 def __repr__(self):  
     with printoptions(precision=4):
         if self.is_axis_aligned():
             type = 'axis aligned'
         elif self.is_affine():
             type = 'affine'
         elif self.is_uniform():
             type = 'uniform'
         else: 
             type = ''
         if type!='': 
             type = " (%s)"%type
         s = "Grid%dD %s: "%(int(self.ndim),type)
         s = s + "\n - space -------------------> " + str(self.space)
         s = s + "\n - shape -------------------> " + str(list(self.shape)) 
         s = s + "\n - min ---------------------> " + str(self.min()) 
         s = s + "\n - max ---------------------> " + str(self.max()) 
         s = s + "\n - span --------------------> " + str(self.span()) 
         s = s + "\n - center ------------------> " + str(self.center()) 
         s = s + "\n - mean dist from center: --> " + str(self.mean_dist_from_center()) 
         s = s + "\n"
     return s
예제 #3
0
 def __repr__(self): 
     with printoptions(precision=4, suppress=True):
         s = "Transformation "+"\n-from: "+str(self.map_from)+"\n-to:   "+\
             str(self.map_to)+"\n-matrix: \n"+self.__data.__repr__()
     return s
예제 #4
0
파일: Core.py 프로젝트: lynch829/occiput
 def __repr__(self): 
     with printoptions(precision=4, suppress=True):
         s = "Transformation "+"\n-from: "+str(self.map_from)+"\n-to:   "+str(self.map_to)+"\n-matrix: \n"+self.__data.__repr__()
     return s