| 2497 | } |
| 2498 | |
| 2499 | static PyObject * |
| 2500 | array_frombuffer(PyObject *NPY_UNUSED(ignored), PyObject *args, PyObject *keywds) |
| 2501 | { |
| 2502 | PyObject *obj = NULL; |
| 2503 | Py_ssize_t nin = -1, offset = 0; |
| 2504 | static char *kwlist[] = {"buffer", "dtype", "count", "offset", "like", NULL}; |
| 2505 | PyObject *like = Py_None; |
| 2506 | PyArray_Descr *type = NULL; |
| 2507 | |
| 2508 | if (!PyArg_ParseTupleAndKeywords(args, keywds, |
| 2509 | "O|O&" NPY_SSIZE_T_PYFMT NPY_SSIZE_T_PYFMT "$O:frombuffer", kwlist, |
| 2510 | &obj, PyArray_DescrConverter, &type, &nin, &offset, &like)) { |
| 2511 | Py_XDECREF(type); |
| 2512 | return NULL; |
| 2513 | } |
| 2514 | |
| 2515 | if (like != Py_None) { |
| 2516 | PyObject *deferred = array_implement_c_array_function_creation( |
| 2517 | "frombuffer", like, args, keywds, NULL, 0, NULL); |
| 2518 | if (deferred != Py_NotImplemented) { |
| 2519 | Py_XDECREF(type); |
| 2520 | return deferred; |
| 2521 | } |
| 2522 | } |
| 2523 | |
| 2524 | if (type == NULL) { |
| 2525 | type = PyArray_DescrFromType(NPY_DEFAULT_TYPE); |
| 2526 | } |
| 2527 | return PyArray_FromBuffer(obj, type, (npy_intp)nin, (npy_intp)offset); |
| 2528 | } |
| 2529 | |
| 2530 | static PyObject * |
| 2531 | array_concatenate(PyObject *NPY_UNUSED(dummy), |
nothing calls this directly
no test coverage detected