summaryrefslogtreecommitdiff
path: root/numpy/lib
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib')
-rw-r--r--numpy/lib/format.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/format.py b/numpy/lib/format.py
index 264fff8d6..dfd50b393 100644
--- a/numpy/lib/format.py
+++ b/numpy/lib/format.py
@@ -370,7 +370,7 @@ def _wrap_header(header, version):
import struct
assert version is not None
fmt, encoding = _header_size_info[version]
- if not isinstance(header, bytes): # always true on python 3
+ if not isinstance(header, bytes):
header = header.encode(encoding)
hlen = len(header) + 1
padlen = ARRAY_ALIGN - ((MAGIC_LEN + struct.calcsize(fmt) + hlen) % ARRAY_ALIGN)