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

Function raise_missing_argument

numpy/core/src/common/npy_argparse.c:235–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235static void
236raise_missing_argument(const char *funcname,
237 const _NpyArgParserCache *cache, int i)
238{
239 if (i < cache->npositional_only) {
240 PyErr_Format(PyExc_TypeError,
241 "%s() missing required positional argument %d",
242 funcname, i);
243 }
244 else {
245 PyObject *kw = cache->kw_strings[i - cache->npositional_only];
246 PyErr_Format(PyExc_TypeError,
247 "%s() missing required argument '%S' (pos %d)",
248 funcname, kw, i);
249 }
250}
251
252
253/**

Callers 1

_npy_parse_argumentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected