diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-10-18 22:52:29 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-10-18 22:52:29 +0000 |
commit | 42ec0613463dd5a1e583370d5f7fd8fddbedced8 (patch) | |
tree | 7f1ddeaf96b7f55d1993d6ae278909224ee8ce69 /numpy/core/src/arrayobject.c | |
parent | b022765aa487070866663b1707e4a2a0d8ead2e8 (diff) | |
download | numpy-42ec0613463dd5a1e583370d5f7fd8fddbedced8.tar.gz |
Allow F_CONTIGUOUS and C_CONTIGUOUS as aliases to FORTRAN and CONTIGUOUS
Diffstat (limited to 'numpy/core/src/arrayobject.c')
-rw-r--r-- | numpy/core/src/arrayobject.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index b8f3bbad2..45983e84d 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -11574,6 +11574,14 @@ static PyGetSetDef arrayflags_getsets[] = { (getter)arrayflags_contiguous_get, NULL, ""}, + {"c_contiguous", + (getter)arrayflags_contiguous_get, + NULL, + ""}, + {"f_contiguous", + (getter)arrayflags_fortran_get, + NULL, + ""}, {"fortran", (getter)arrayflags_fortran_get, NULL, @@ -11691,6 +11699,10 @@ arrayflags_getitem(PyArrayFlagsObject *self, PyObject *ind) case 12: if (strncmp(key, "UPDATEIFCOPY", n)==0) return arrayflags_updateifcopy_get(self); + if (strncmp(key, "C_CONTIGUOUS", n)==0) + return arrayflags_contiguous_get(self); + if (strncmp(key, "F_CONTIGUOUS", n)==0) + return arrayflags_fortran_get(self); break; } @@ -11736,8 +11748,8 @@ arrayflags_print(PyArrayFlagsObject *self) return PyString_FromFormat(" %s : %s\n %s : %s\n %s : %s\n"\ " %s : %s\n %s : %s\n %s : %s", - "CONTIGUOUS", _torf_(fl, CONTIGUOUS), - "FORTRAN", _torf_(fl, FORTRAN), + "C_CONTIGUOUS", _torf_(fl, CONTIGUOUS), + "F_CONTIGUOUS", _torf_(fl, FORTRAN), "OWNDATA", _torf_(fl, OWNDATA), "WRITEABLE", _torf_(fl, WRITEABLE), "ALIGNED", _torf_(fl, ALIGNED), |