Skip to content

Commit 3f61744

Browse files
committed
import Iterable and Sized from collections.abc
Because of the following DeprecationWarning: ``` DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working ```
1 parent 437f386 commit 3f61744

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

adaptive/learner/balancing_learner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# -*- coding: utf-8 -*-
22

3-
from collections import defaultdict, Iterable
3+
from collections import defaultdict
4+
from collections.abc import Iterable
45
from contextlib import suppress
56
from functools import partial
67
from operator import itemgetter

adaptive/learner/learner1D.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import heapq
55
import itertools
66
import math
7-
from collections import Iterable
7+
from collections.abc import Iterable
88

99
import numpy as np
1010
import sortedcontainers

adaptive/learner/learnerND.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# -*- coding: utf-8 -*-
22

3-
from collections import OrderedDict, Iterable
3+
from collections import OrderedDict
4+
from collections.abc import Iterable
45
import functools
56
import heapq
67
import itertools

adaptive/learner/triangulation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from collections import Counter, Sized, Iterable
1+
from collections import Counter
2+
from collections.abc import Sized, Iterable
23
from itertools import combinations, chain
34

45
import numpy as np

0 commit comments

Comments
 (0)