From 5c8d5c263b93700ae92aff38bb9a8d05c0a185e6 Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Sat, 13 Apr 2013 09:41:22 +0200 Subject: MAINT: adept divisions for truedivide Following deprecations would cause problems otherwise. --- 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 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_): -- cgit v1.2.1