summaryrefslogtreecommitdiff
path: root/numpy/core/defchararray.py
diff options
context:
space:
mode:
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 2a8b31616..92995baa1 100644
--- a/numpy/core/defchararray.py
+++ b/numpy/core/defchararray.py
@@ -90,7 +90,7 @@ def _get_num_chars(a):
for a unicode array this is itemsize / 4.
"""
if issubclass(a.dtype.type, unicode_):
- return a.itemsize / 4
+ return a.itemsize // 4
return a.itemsize
@@ -2593,7 +2593,7 @@ def array(obj, itemsize=None, copy=True, unicode=None, order=None):
# to divide by the size of a single Unicode character,
# which for Numpy is always 4
if issubclass(obj.dtype.type, unicode_):
- itemsize /= 4
+ itemsize //= 4
if unicode is None:
if issubclass(obj.dtype.type, unicode_):