From f99719f6e44f11ed9b2ce4db872fc693882fdfe6 Mon Sep 17 00:00:00 2001
From: Alessia Saccardo <s212246@dtu.dk>
Date: Tue, 10 Dec 2024 10:37:38 +0100
Subject: [PATCH] fix signature

---
 qim3d/viz/explore.py | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/qim3d/viz/explore.py b/qim3d/viz/explore.py
index 7e9b16f2..61b7fd3f 100644
--- a/qim3d/viz/explore.py
+++ b/qim3d/viz/explore.py
@@ -5,7 +5,7 @@ Provides a collection of visualization functions.
 import math
 import warnings
 
-from typing import List, Optional, Union
+from typing import List, Optional, Union, Tuple
 
 import dask.array as da
 import ipywidgets as widgets
@@ -818,21 +818,21 @@ def chunks(zarr_path: str, **kwargs):
 def histogram(
     vol: np.ndarray,
     bins: Union[int, str] = "auto",
-    slice_idx: Union[int, str] = None,
+    slice_idx: Union[int, str, None] = None,
     axis: int = 0,
     kde: bool = True,
     log_scale: bool = False,
     despine: bool = True,
     show_title: bool = True,
-    color="qim3d",
-    edgecolor=None,
-    figsize=(8, 4.5),
-    element="step",
-    return_fig=False,
-    show=True,
-    ax=None,  # New parameter for target axes
-    **sns_kwargs,
-):
+    color: str = "qim3d",
+    edgecolor: Optional[str] = None,
+    figsize: Tuple[float, float] = (8, 4.5),
+    element: str = "step",
+    return_fig: bool = False,
+    show: bool = True,
+    ax: Optional[plt.Axes] = None,
+    **sns_kwargs: Union[str, float, int, bool]
+) -> Optional[Union[plt.Figure, plt.Axes]]:
     """
     Plots a histogram of voxel intensities from a 3D volume, with options to show a specific slice or the entire volume.
     
@@ -933,7 +933,7 @@ def threshold(
         cmap_overlay: str = 'gray',
         vmin: float = None,
         vmax: float = None,
-):
+) -> widgets.VBox:
     """
     This function provides an interactive interface to explore thresholding on a 
     3D volume slice-by-slice. Users can either manually set the threshold value 
-- 
GitLab