From 73ce0bbd2f65ed00d5ab759f7f7d4479a863d120 Mon Sep 17 00:00:00 2001 From: Matthew Farrell Date: Fri, 4 Aug 2023 20:45:23 -0400 Subject: [PATCH] Update collections import in data_structures.py Updated Hashable import from collections to support most recent python versions. --- numpy_ml/utils/data_structures.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/numpy_ml/utils/data_structures.py b/numpy_ml/utils/data_structures.py index 585e469..7287c3d 100644 --- a/numpy_ml/utils/data_structures.py +++ b/numpy_ml/utils/data_structures.py @@ -1,6 +1,9 @@ import heapq from copy import copy -from collections import Hashable +try: + from collections.abc import Hashable +except ImportError: + from collections import Hashable import numpy as np