From 9a21ec857b22ff0140a7f71a12f2cc943f163404 Mon Sep 17 00:00:00 2001 From: Seth Troisi Date: Wed, 15 Jan 2020 17:03:58 -0800 Subject: [MAINT] Cleanup python2 sys.version checks --- numpy/core/defchararray.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/core/defchararray.py') diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py index 4d7781317..1cfdc55c0 100644 --- a/numpy/core/defchararray.py +++ b/numpy/core/defchararray.py @@ -1953,8 +1953,8 @@ class chararray(ndarray): # strings in the new array. itemsize = long(itemsize) - if sys.version_info[0] >= 3 and isinstance(buffer, str): - # On Py3, unicode objects do not have the buffer interface + if isinstance(buffer, str): + # unicode objects do not have the buffer interface filler = buffer buffer = None else: -- cgit v1.2.1