def __repr__(self): """Return ``repr(self)``.""" if self.ndim == 1: return '{}({!r}, {!r})'.format(self.__class__.__name__, self.min_pt[0], self.max_pt[0]) else: return '{}({}, {})'.format(self.__class__.__name__, array1d_repr(self.min_pt), array1d_repr(self.max_pt))
def __repr__(self): """Return ``repr(self)``.""" if self.ndim == 1: return 'Interval({!r}, {!r})'.format(self.begin[0], self.end[0]) elif self.ndim == 2: return 'Rectangle({!r}, {!r})'.format(list(self.begin), list(self.end)) elif self.ndim == 3: return 'Cuboid({!r}, {!r})'.format(list(self.begin), list(self.end)) else: return 'IntervalProd({}, {})'.format(array1d_repr(self.begin), array1d_repr(self.end))
def __repr__(self): """g.__repr__() <==> repr(g).""" vec_str = ', '.join(array1d_repr(vec) for vec in self.coord_vectors) if self.as_midp: return 'TensorGrid({}, as_midp=True)'.format(vec_str) else: return 'TensorGrid({})'.format(vec_str)
def repr_part(self): """Return a string usable in a space's ``__repr__`` method.""" part = 'weight={}'.format(array1d_repr(self.vector, nprint=10)) if self.exponent != 2.0: part += ', exponent={}'.format(self.exponent) if self._dist_using_inner: part += ', dist_using_inner=True' return part
def __repr__(self): """Return ``repr(self)``.""" return '{!r}.element({})'.format(self.space, array1d_repr(self))
def __repr__(self): """``vec.__repr__() <==> repr(vec)``.""" return '{!r}.element({})'.format(self.space, array1d_repr(self))
def __repr__(self): """Return ``repr(self)``.""" inner_str = ', '.join(array1d_repr(vec) for vec in self.coord_vectors) return '{}({})'.format(self.__class__.__name__, inner_str)
def __repr__(self): """``ip.__repr__() <==> repr(ip)``.""" return ('IntervalProd({}, {})'.format( array1d_repr(self.begin), array1d_repr(self._end)))