We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e724d73 commit 701c9c8Copy full SHA for 701c9c8
src/hist/basehist.py
@@ -226,6 +226,14 @@ def _repr_html_(self) -> str | None:
226
227
return None
228
229
+ def __repr__(self) -> str:
230
+ # Workaround for boost-histogram 1.7.0 and 1.7.1 having a 0
231
+ old_repr = super().__repr__()
232
+ if "MultiCell(0)" in old_repr:
233
+ nelem = self._hist.nelem()
234
+ return old_repr.replace("MultiCell(0)", f"MultiCell({nelem})")
235
+ return old_repr
236
+
237
def _name_to_index(self, name: str) -> int:
238
"""
239
Transform axis name to axis index, given axis name, return axis \
0 commit comments