示例#1
0
文件: weighting.py 项目: yochju/odl
 def repr_part(self):
     """Return a string usable in a space's ``__repr__`` method."""
     if self.matrix_issparse:
         part = 'weighting={}'.format(self.matrix)
     else:
         part = 'weighting={}'.format(arraynd_repr(self.matrix, nprint=10))
     if self.exponent != 2.0:
         part += ', exponent={}'.format(self.exponent)
     if self.dist_using_inner:
         part += ', dist_using_inner=True'
     return part
示例#2
0
 def __repr__(self):
     """Return ``repr(self)``."""
     return '{!r}.element({})'.format(self.space,
                                      arraynd_repr(self.asarray()))
示例#3
0
 def __repr__(self):
     """Return ``repr(self)``."""
     return '{!r}.element({})'.format(self.space,
                                      arraynd_repr(self.asarray()))