diff options
author | Daniel Hrisca <daniel.hrisca@gmail.com> | 2017-07-06 18:08:51 +0300 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2017-07-06 09:08:51 -0600 |
commit | f696935e1b62daf2901f64abc243d195530b7a7b (patch) | |
tree | eb91eef14a9b8fe889d33eea0ba0e699f5f20559 /numpy | |
parent | 459a8839c09df5c8e89337aae3314d4105f896ea (diff) | |
download | numpy-f696935e1b62daf2901f64abc243d195530b7a7b.tar.gz |
BUG: Fix error in fromstring function from numpy.core.records (#9369)
BUG: fix error in fromstring function from numpy.core.records
the shape was computer using true division and
ndarray expects a tuple of integers as shape parameter
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/records.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/records.py b/numpy/core/records.py index 9404de8d2..69d997cd0 100644 --- a/numpy/core/records.py +++ b/numpy/core/records.py @@ -704,7 +704,7 @@ def fromstring(datastring, dtype=None, shape=None, offset=0, formats=None, itemsize = descr.itemsize if (shape is None or shape == 0 or shape == -1): - shape = (len(datastring) - offset) / itemsize + shape = (len(datastring) - offset) // itemsize _array = recarray(shape, descr, buf=datastring, offset=offset) return _array |