summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/arrayobject.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c
index 0ab04ce41..f79e78aa4 100644
--- a/numpy/core/src/arrayobject.c
+++ b/numpy/core/src/arrayobject.c
@@ -3383,8 +3383,7 @@ _IsContiguous(PyArrayObject *ap)
for (i = ap->nd-1; i >= 0; --i) {
dim = ap->dimensions[i];
/* contiguous by definition */
- if (dim == 0) return 1;
- if (dim == 1) continue;
+ if (dim == 0) return 1;
if (ap->strides[i] != sd) return 0;
sd *= dim;
}
@@ -3407,7 +3406,6 @@ _IsFortranContiguous(PyArrayObject *ap)
dim = ap->dimensions[i];
/* contiguous by definition */
if (dim == 0) return 1;
- if (dim == 1) continue;
if (ap->strides[i] != sd) return 0;
sd *= dim;
}