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

Function io_unpack

numpy/core/src/multiarray/compiled_base.c:2004–2026  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2002
2003
2004NPY_NO_EXPORT PyObject *
2005io_unpack(PyObject *NPY_UNUSED(self), PyObject *args, PyObject *kwds)
2006{
2007 PyObject *obj;
2008 int axis = NPY_MAXDIMS;
2009 PyObject *count = Py_None;
2010 static char *kwlist[] = {"in", "axis", "count", "bitorder", NULL};
2011 const char * c = NULL;
2012
2013 if (!PyArg_ParseTupleAndKeywords( args, kwds, "O|O&Os:unpack" , kwlist,
2014 &obj, PyArray_AxisConverter, &axis, &count, &c)) {
2015 return NULL;
2016 }
2017 if (c == NULL) {
2018 c = "b";
2019 }
2020 if (c[0] != 'l' && c[0] != 'b') {
2021 PyErr_SetString(PyExc_ValueError,
2022 "'order' must begin with 'l' or 'b'");
2023 return NULL;
2024 }
2025 return unpack_bits(obj, axis, count, c[0]);
2026}

Callers

nothing calls this directly

Calls 1

unpack_bitsFunction · 0.85

Tested by

no test coverage detected