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

Function array_newbyteorder

numpy/core/src/multiarray/methods.c:2797–2813  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2795
2796
2797static PyObject *
2798array_newbyteorder(PyArrayObject *self, PyObject *args)
2799{
2800 char endian = NPY_SWAP;
2801 PyArray_Descr *new;
2802
2803 if (!PyArg_ParseTuple(args, "|O&:newbyteorder", PyArray_ByteorderConverter,
2804 &endian)) {
2805 return NULL;
2806 }
2807 new = PyArray_DescrNewByteorder(PyArray_DESCR(self), endian);
2808 if (!new) {
2809 return NULL;
2810 }
2811 return PyArray_View(self, new, NULL);
2812
2813}
2814
2815static PyObject *
2816array_complex(PyArrayObject *self, PyObject *NPY_UNUSED(args))

Callers

nothing calls this directly

Calls 3

PyArray_DESCRFunction · 0.85
PyArray_ViewFunction · 0.85

Tested by

no test coverage detected