From 514e1f74f8aec7da732a181a071afc060ef1669e Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Wed, 28 Feb 2007 04:13:31 +0000 Subject: Fix numarray.fromstring --- numpy/numarray/functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/numarray/functions.py') 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 -- cgit v1.2.1