summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/core/records.py2
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