diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-08-29 10:28:11 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-08-29 10:28:11 +0000 |
commit | 775a47de7e2f4b039592d614e7ac3fda464975a8 (patch) | |
tree | 6ec0d74f0505ba0e60f3ee01af70b4669ec38475 /numpy/numarray/functions.py | |
parent | ce7a968a7b5cdb328ca1ea222211ad9cd8e506ad (diff) | |
download | numpy-775a47de7e2f4b039592d614e7ac3fda464975a8.tar.gz |
Add axis arguments to various functions so as not to rely on the defaults.
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 55922e9fe..95738d220 100644 --- a/numpy/numarray/functions.py +++ b/numpy/numarray/functions.py @@ -206,7 +206,7 @@ def fromfile(infile, type=None, shape=None, sizing=STRICT, ##file whose size may be determined before allocation, should be ##quick -- only one allocation will be needed. - recsize = dtype.itemsize * N.product([i for i in shape if i != -1]) + recsize = dtype.itemsize * N.product([i for i in shape if i != -1],axis=0) blocksize = max(_BLOCKSIZE/recsize, 1)*recsize ##try to estimate file size @@ -268,7 +268,7 @@ def fromstring(datastring, type=None, shape=None, typecode=None, dtype=None): if shape is None: count = -1 else: - count = N.product(shape)*dtype.itemsize + count = N.product(shape,axis=0)*dtype.itemsize res = N.fromstring(datastring, count=count) if shape is not None: res.shape = shape |