| 616 | } |
| 617 | |
| 618 | static PyObject * |
| 619 | arrayflags_print(PyArrayFlagsObject *self) |
| 620 | { |
| 621 | int fl = self->flags; |
| 622 | const char *_warn_on_write = ""; |
| 623 | |
| 624 | if (fl & NPY_ARRAY_WARN_ON_WRITE) { |
| 625 | _warn_on_write = " (with WARN_ON_WRITE=True)"; |
| 626 | } |
| 627 | return PyUnicode_FromFormat( |
| 628 | " %s : %s\n %s : %s\n" |
| 629 | " %s : %s\n %s : %s%s\n" |
| 630 | " %s : %s\n %s : %s\n", |
| 631 | "C_CONTIGUOUS", _torf_(fl, NPY_ARRAY_C_CONTIGUOUS), |
| 632 | "F_CONTIGUOUS", _torf_(fl, NPY_ARRAY_F_CONTIGUOUS), |
| 633 | "OWNDATA", _torf_(fl, NPY_ARRAY_OWNDATA), |
| 634 | "WRITEABLE", _torf_(fl, NPY_ARRAY_WRITEABLE), |
| 635 | _warn_on_write, |
| 636 | "ALIGNED", _torf_(fl, NPY_ARRAY_ALIGNED), |
| 637 | "WRITEBACKIFCOPY", _torf_(fl, NPY_ARRAY_WRITEBACKIFCOPY) |
| 638 | ); |
| 639 | } |
| 640 | |
| 641 | static PyObject* |
| 642 | arrayflags_richcompare(PyObject *self, PyObject *other, int cmp_op) |