diff options
author | Julian Taylor <juliantaylor108@gmail.com> | 2014-03-03 19:30:39 +0100 |
---|---|---|
committer | Julian Taylor <juliantaylor108@gmail.com> | 2014-03-03 19:30:39 +0100 |
commit | e9afd4091e447fcf90ead63598a4932b6779bf3d (patch) | |
tree | 816b2e7cac6d12caed0b1d51506610fb95beccc4 /numpy/lib/utils.py | |
parent | d4c7c3a69a0dc2458c876dd17a15b1a18b179fd8 (diff) | |
parent | 4e1bffa7cc430a9275bcc4c9c27a907c78395cda (diff) | |
download | numpy-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.py | 5 |
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 |