MCPcopy Create free account
hub / github.com/numpy/numpy / arrayflags_print

Function arrayflags_print

numpy/core/src/multiarray/flagsobject.c:618–639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

616}
617
618static PyObject *
619arrayflags_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
641static PyObject*
642arrayflags_richcompare(PyObject *self, PyObject *other, int cmp_op)

Callers

nothing calls this directly

Calls 1

_torf_Function · 0.85

Tested by

no test coverage detected