summaryrefslogtreecommitdiff
path: root/numpy/lib/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r--numpy/lib/utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py
index 1f1cdfc8a..791f271b1 100644
--- a/numpy/lib/utils.py
+++ b/numpy/lib/utils.py
@@ -210,8 +210,9 @@ def byte_bounds(a):
a_data = ai['data'][0]
astrides = ai['strides']
ashape = ai['shape']
- bytes_a = int(ai['typestr'][2:])
-
+
+ bytes_a = asarray(a).dtype.itemsize
+
a_low = a_high = a_data
if astrides is None: # contiguous case
a_high += a.size * bytes_a