diff options
Diffstat (limited to 'numpy/numarray/functions.py')
-rw-r--r-- | numpy/numarray/functions.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/numarray/functions.py b/numpy/numarray/functions.py index 329e08024..afb5ce875 100644 --- a/numpy/numarray/functions.py +++ b/numpy/numarray/functions.py @@ -270,8 +270,8 @@ def fromstring(datastring, type=None, shape=None, typecode=None, dtype=None): if shape is None: count = -1 else: - count = N.product(shape)*dtype.itemsize - res = N.fromstring(datastring, count=count) + count = N.product(shape) + res = N.fromstring(datastring, dtype=dtype, count=count) if shape is not None: res.shape = shape return res |