summaryrefslogtreecommitdiff
path: root/numpy/core/defchararray.py
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2013-04-13 09:41:22 +0200
committerSebastian Berg <sebastian@sipsolutions.net>2013-05-31 19:16:02 +0200
commit5c8d5c263b93700ae92aff38bb9a8d05c0a185e6 (patch)
tree0f2aec8e1516213f81378d253b465d8aa6f1c04d /numpy/core/defchararray.py
parent44a796154a4d349768c6e2244b39e8a69d2d1680 (diff)
downloadnumpy-5c8d5c263b93700ae92aff38bb9a8d05c0a185e6.tar.gz
MAINT: adept divisions for truedivide
Following deprecations would cause problems otherwise.
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_):