summaryrefslogtreecommitdiff
path: root/numpy/lib/utils.py
diff options
context:
space:
mode:
authorJulian Taylor <juliantaylor108@gmail.com>2014-03-03 19:30:39 +0100
committerJulian Taylor <juliantaylor108@gmail.com>2014-03-03 19:30:39 +0100
commite9afd4091e447fcf90ead63598a4932b6779bf3d (patch)
tree816b2e7cac6d12caed0b1d51506610fb95beccc4 /numpy/lib/utils.py
parentd4c7c3a69a0dc2458c876dd17a15b1a18b179fd8 (diff)
parent4e1bffa7cc430a9275bcc4c9c27a907c78395cda (diff)
downloadnumpy-e9afd4091e447fcf90ead63598a4932b6779bf3d.tar.gz
Merge pull request #4414 from mosessky/master
BUG: fix issue#4354 byte_bounds() bug closes gh-4354
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