From 1ffaeb44f8e9b9cd82456deba13307f609407c20 Mon Sep 17 00:00:00 2001
From: Synchon Mandal
Date: Fri, 9 Feb 2024 10:32:40 +0100
Subject: [PATCH] chore: update type annotation and docstring for
closest_resolution()
---
junifer/data/utils.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/junifer/data/utils.py b/junifer/data/utils.py
index 99306b3c19..291425c186 100644
--- a/junifer/data/utils.py
+++ b/junifer/data/utils.py
@@ -8,14 +8,14 @@
def closest_resolution(
- resolution: Optional[float],
+ resolution: Optional[Union[float, int]],
valid_resolution: Union[List[float], List[int], np.ndarray],
) -> Union[float, int]:
"""Find the closest resolution.
Parameters
----------
- resolution : float, optional
+ resolution : float or int, optional
The given resolution. If None, will return the highest resolution
(default None).
valid_resolution : list of float or int, or np.ndarray