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

Function array_putmask

numpy/core/src/multiarray/multiarraymodule.c:1509–1530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1507}
1508
1509static PyObject *
1510array_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

Callers

nothing calls this directly

Calls 1

PyArray_PutMaskFunction · 0.85

Tested by

no test coverage detected