summaryrefslogtreecommitdiff
path: root/numpy/core/src/arrayobject.c
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-03-29 02:15:19 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-03-29 02:15:19 +0000
commitc1dff9e8f2f9231597adb132634305ba407a8cc5 (patch)
tree00ee206daf52bab18c2a6c7be4c2633d9bddbd8e /numpy/core/src/arrayobject.c
parentf819562be99e8f0adde23264d3aab654c0d32071 (diff)
downloadnumpy-c1dff9e8f2f9231597adb132634305ba407a8cc5.tar.gz
Change so that .ravel() has old behavior.
Diffstat (limited to 'numpy/core/src/arrayobject.c')
-rw-r--r--numpy/core/src/arrayobject.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c
index 084eaaf7a..55254b5e9 100644
--- a/numpy/core/src/arrayobject.c
+++ b/numpy/core/src/arrayobject.c
@@ -3502,7 +3502,8 @@ _check_axis(PyArrayObject *arr, int *axis, int flags)
if ((*axis >= MAX_DIMS) || (n==0)) {
temp = PyArray_Ravel(arr,0);
- *axis = PyArray_NDIM(temp)-1;
+ if (temp) *axis = PyArray_NDIM(temp)-1;
+ else *axis = 0;
return temp;
}
else {