| 1507 | } |
| 1508 | |
| 1509 | static PyObject * |
| 1510 | array_putmask(PyObject *NPY_UNUSED(module), PyObject *const *args, |
| 1511 | Py_ssize_t len_args, PyObject *kwnames ) |
| 1512 | { |
| 1513 | PyObject *mask, *values; |
| 1514 | PyObject *array; |
| 1515 | |
| 1516 | NPY_PREPARE_ARGPARSER; |
| 1517 | if (npy_parse_arguments("putmask", args, len_args, kwnames, |
| 1518 | "", NULL, &array, |
| 1519 | "mask", NULL, &mask, |
| 1520 | "values", NULL, &values, |
| 1521 | NULL, NULL, NULL) < 0) { |
| 1522 | return NULL; |
| 1523 | } |
| 1524 | if (!PyArray_Check(array)) { |
| 1525 | PyErr_SetString(PyExc_TypeError, |
| 1526 | "argument a of putmask must be a numpy array"); |
| 1527 | } |
| 1528 | |
| 1529 | return PyArray_PutMask((PyArrayObject *)array, values, mask); |
| 1530 | } |
| 1531 | |
| 1532 | |
| 1533 | /*NUMPY_API |
nothing calls this directly
no test coverage detected