Beispiel #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
Beispiel #2
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
Beispiel #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
Beispiel #4
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