Преглед изворни кода

fixed part printing if no parts are present

Dimitri Korsch пре 4 година
родитељ
комит
9bd1c3bdba
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      cvdatasets/dataset/part/base.py

+ 2 - 0
cvdatasets/dataset/part/base.py

@@ -18,6 +18,8 @@ class BasePartCollection(ABC):
 		return len(self._parts)
 
 	def __repr__(self):
+		if len(self._parts) == 0:
+			return repr(self._parts)
 		return repr(np.stack([p.as_annotation for p in self._parts]))
 
 	@property