| 2002 | |
| 2003 | |
| 2004 | NPY_NO_EXPORT PyObject * |
| 2005 | io_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 | } |
nothing calls this directly
no test coverage detected