Skip to content

Commit ac58608

Browse files
committed
tests: remove deprecation warning
1 parent a46bc6f commit ac58608

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/test_numpy_array.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,6 @@ def test_make_empty_shaped_array():
188188

189189
def test_wrap():
190190
def assert_references(a, b, base=None):
191-
from distutils.version import LooseVersion
192-
193191
if base is None:
194192
base = a
195193
assert a is not b
@@ -200,7 +198,8 @@ def assert_references(a, b, base=None):
200198
assert a.flags.f_contiguous == b.flags.f_contiguous
201199
assert a.flags.writeable == b.flags.writeable
202200
assert a.flags.aligned == b.flags.aligned
203-
if LooseVersion(np.__version__) >= LooseVersion("1.14.0"):
201+
# 1.13 supported Python 3.6
202+
if tuple(int(x) for x in np.__version__.split(".")[:2]) >= (1, 14):
204203
assert a.flags.writebackifcopy == b.flags.writebackifcopy
205204
else:
206205
assert a.flags.updateifcopy == b.flags.updateifcopy

0 commit comments

Comments
 (0)