summaryrefslogtreecommitdiff
path: root/numpy/core/defchararray.py
diff options
context:
space:
mode:
authorSeth Troisi <sethtroisi@google.com>2020-01-15 17:03:58 -0800
committerSeth Troisi <sethtroisi@google.com>2020-01-20 15:22:57 -0800
commit9a21ec857b22ff0140a7f71a12f2cc943f163404 (patch)
tree1f8b26a1bb346fab26d2210de286d29011bf2bf1 /numpy/core/defchararray.py
parentb753aa7a3a2c958e70826fb8af3b56db5c758819 (diff)
downloadnumpy-9a21ec857b22ff0140a7f71a12f2cc943f163404.tar.gz
[MAINT] Cleanup python2 sys.version checks
Diffstat (limited to 'numpy/core/defchararray.py')
-rw-r--r--numpy/core/defchararray.py4
1 files changed, 2 insertions, 2 deletions
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: