Skip to content
Snippets Groups Projects

add histogram visualization function

Merged s212246 requested to merge viz-histogram into main
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
+ 2
2
@@ -814,8 +814,8 @@ def histogram(
@@ -814,8 +814,8 @@ def histogram(
"""
"""
if axis not in [0, 1, 2]:
if not (0 <= axis < vol.ndim):
raise ValueError("Axis must be 0, 1, or 2.")
raise ValueError(f"Axis must be an integer between 0 and {vol.ndim - 1}.")
if isinstance(slice, int):
if isinstance(slice, int):
if 0 <= slice < vol.shape[axis]:
if 0 <= slice < vol.shape[axis]:
Loading