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

Function array_matrixproduct

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

Source from the content-addressed store, hash-verified

2594}
2595
2596static PyObject *
2597array_matrixproduct(PyObject *NPY_UNUSED(dummy),
2598 PyObject *const *args, Py_ssize_t len_args, PyObject *kwnames)
2599{
2600 PyObject *v, *a, *o = NULL;
2601 PyArrayObject *ret;
2602
2603 NPY_PREPARE_ARGPARSER;
2604 if (npy_parse_arguments("dot", args, len_args, kwnames,
2605 "a", NULL, &a,
2606 "b", NULL, &v,
2607 "|out", NULL, &o,
2608 NULL, NULL, NULL) < 0) {
2609 return NULL;
2610 }
2611 if (o != NULL) {
2612 if (o == Py_None) {
2613 o = NULL;
2614 }
2615 else if (!PyArray_Check(o)) {
2616 PyErr_SetString(PyExc_TypeError, "'out' must be an array");
2617 return NULL;
2618 }
2619 }
2620 ret = (PyArrayObject *)PyArray_MatrixProduct2(a, v, (PyArrayObject *)o);
2621 return PyArray_Return(ret);
2622}
2623
2624
2625static PyObject *

Callers

nothing calls this directly

Calls 2

PyArray_MatrixProduct2Function · 0.85
PyArray_ReturnFunction · 0.85

Tested by

no test coverage detected