diff options
author | Mark Wiebe <mwwiebe@gmail.com> | 2011-08-18 12:40:49 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2011-08-27 07:26:56 -0600 |
commit | 73be11db794d115a7d9bd2e822c0d8008bc14a28 (patch) | |
tree | 4029a8a8160d6e4692ed69eed244aafab8deaa46 /numpy/core/fromnumeric.py | |
parent | c8732958c8e07f2306029dfde2178faf9c01d049 (diff) | |
download | numpy-73be11db794d115a7d9bd2e822c0d8008bc14a28.tar.gz |
BUG: Some bugs in squeeze and concatenate found by testing SciPy
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 12cdbd68a..f3930eaa9 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -905,7 +905,12 @@ def squeeze(a, axis=None): squeeze = a.squeeze except AttributeError: return _wrapit(a, 'squeeze') - return squeeze(axis=axis) + try: + # First try to use the new axis= parameter + return squeeze(axis=axis) + except TypeError: + # For backwards compatibility + return squeeze() def diagonal(a, offset=0, axis1=0, axis2=1): |