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

Function array_dot

numpy/core/src/multiarray/methods.c:2472–2499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2470
2471
2472static PyObject *
2473array_dot(PyArrayObject *self,
2474 PyObject *const *args, Py_ssize_t len_args, PyObject *kwnames)
2475{
2476 PyObject *a = (PyObject *)self, *b, *o = NULL;
2477 PyArrayObject *ret;
2478 NPY_PREPARE_ARGPARSER;
2479
2480 if (npy_parse_arguments("dot", args, len_args, kwnames,
2481 "b", NULL, &b,
2482 "|out", NULL, &o,
2483 NULL, NULL, NULL) < 0) {
2484 return NULL;
2485 }
2486
2487 if (o != NULL) {
2488 if (o == Py_None) {
2489 o = NULL;
2490 }
2491 else if (!PyArray_Check(o)) {
2492 PyErr_SetString(PyExc_TypeError,
2493 "'out' must be an array");
2494 return NULL;
2495 }
2496 }
2497 ret = (PyArrayObject *)PyArray_MatrixProduct2(a, b, (PyArrayObject *)o);
2498 return PyArray_Return(ret);
2499}
2500
2501
2502static PyObject *

Callers

nothing calls this directly

Calls 2

PyArray_MatrixProduct2Function · 0.85
PyArray_ReturnFunction · 0.85

Tested by

no test coverage detected