diff --git a/src/deep_neurographs/utils/util.py b/src/deep_neurographs/utils/util.py index 023b6a6..1413c60 100644 --- a/src/deep_neurographs/utils/util.py +++ b/src/deep_neurographs/utils/util.py @@ -477,7 +477,10 @@ def sample_once(my_container): sample """ - return sample(my_container, 1)[0] + if type(my_container) is list: + return sample(my_container, 1)[0] + else: + return sample(list(my_container), 1)[0] # --- dictionary utils ---