We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6ac1f10 + 7850e30 commit b30b3a9Copy full SHA for b30b3a9
cuqi/geometry/_geometry.py
@@ -225,7 +225,12 @@ def __eq__(self, obj):
225
return self._all_values_equal(obj)
226
227
def __repr__(self) -> str:
228
- return "{}{}".format(self.__class__.__name__,self.par_shape)
+ if self.par_shape == self.fun_shape:
229
+ return "{}[{}]".format(self.__class__.__name__,
230
+ self.par_shape if len(self.par_shape) != 1 else self.par_shape[0])
231
+ return "{}[{}: {}]".format(self.__class__.__name__,
232
+ self.par_shape if len(self.par_shape) != 1 else self.par_shape[0],
233
+ self.fun_shape if len(self.fun_shape) != 1 else self.fun_shape[0])
234
235
def _all_values_equal(self, obj):
236
"""Returns true of all values of the object and self are equal"""
0 commit comments