diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-08-29 17:56:21 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-08-29 17:56:21 +0000 |
commit | 63326185c04be2795a7a33028d427e9c8c31c900 (patch) | |
tree | 62fb5b9f5f7b6e518346fa0893e408fa24755021 /numpy/lib | |
parent | 064c8eb43637e920f6019215b00ef1593d74b0c1 (diff) | |
download | numpy-63326185c04be2795a7a33028d427e9c8c31c900.tar.gz |
Clean-up some un-needed default axes. Fix default axes of ma.sum and ma.product
Diffstat (limited to 'numpy/lib')
-rw-r--r-- | numpy/lib/arraysetops.py | 2 | ||||
-rw-r--r-- | numpy/lib/function_base.py | 4 | ||||
-rw-r--r-- | numpy/lib/shape_base.py | 4 | ||||
-rw-r--r-- | numpy/lib/utils.py | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py index b98517f3d..7bd666029 100644 --- a/numpy/lib/arraysetops.py +++ b/numpy/lib/arraysetops.py @@ -179,7 +179,7 @@ def test_unique1d_speed( plot_results = False ): dt1s.append( dt1 ) dt2s.append( dt2 ) - assert numpy.alltrue( b == c) + assert numpy.alltrue( b == c ) print nItems diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index a202f67cb..a14a3dc9f 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -540,9 +540,9 @@ def extract(condition, arr): """Return the elements of ravel(arr) where ravel(condition) is True (in 1D). - Equivalent to compress(ravel(condition), ravel(arr),0). + Equivalent to compress(ravel(condition), ravel(arr)). """ - return _nx.take(ravel(arr), nonzero(ravel(condition))[0],axis=0) + return _nx.take(ravel(arr), nonzero(ravel(condition))[0]) def place(arr, mask, vals): """Similar to putmask arr[mask] = vals but the 1D array vals has the diff --git a/numpy/lib/shape_base.py b/numpy/lib/shape_base.py index 03db2570a..d44215446 100644 --- a/numpy/lib/shape_base.py +++ b/numpy/lib/shape_base.py @@ -32,7 +32,7 @@ def apply_along_axis(func1d,axis,arr,*args): if isscalar(res): outarr = zeros(outshape,asarray(res).dtype) outarr[ind] = res - Ntot = product(outshape,axis=0) + Ntot = product(outshape) k = 1 while k < Ntot: # increment the index @@ -48,7 +48,7 @@ def apply_along_axis(func1d,axis,arr,*args): k += 1 return outarr else: - Ntot = product(outshape,axis=0) + Ntot = product(outshape) holdshape = outshape outshape = list(arr.shape) outshape[axis] = len(res) diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py index deca8fa06..db7c00db6 100644 --- a/numpy/lib/utils.py +++ b/numpy/lib/utils.py @@ -126,7 +126,7 @@ def who(vardict=None): namestr = name original=1 shapestr = " x ".join(map(str, var.shape)) - bytestr = str(var.itemsize*product(var.shape,axis=0)) + bytestr = str(var.itemsize*product(var.shape)) sta.append([namestr, shapestr, bytestr, var.dtype.name, original]) |