diff options
author | Travis Oliphant <oliphant@enthought.com> | 2007-02-28 04:13:31 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2007-02-28 04:13:31 +0000 |
commit | 514e1f74f8aec7da732a181a071afc060ef1669e (patch) | |
tree | 7f33729b637a78d9101b54f446dda8fcbfc9b9c5 /numpy/numarray/functions.py | |
parent | 9edb7d795f01500de8b7f5006ffa406018edaf99 (diff) | |
download | numpy-514e1f74f8aec7da732a181a071afc060ef1669e.tar.gz |
Fix numarray.fromstring
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 |