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

Function array_power

numpy/core/src/multiarray/number.c:579–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

577}
578
579static PyObject *
580array_power(PyObject *a1, PyObject *o2, PyObject *modulo)
581{
582 PyObject *value = NULL;
583
584 if (modulo != Py_None) {
585 /* modular exponentiation is not implemented (gh-8804) */
586 Py_INCREF(Py_NotImplemented);
587 return Py_NotImplemented;
588 }
589
590 BINOP_GIVE_UP_IF_NEEDED(a1, o2, nb_power, array_power);
591 if (fast_scalar_power(a1, o2, 0, &value) != 0) {
592 value = PyArray_GenericBinaryFunction(a1, o2, n_ops.power);
593 }
594 return value;
595}
596
597static PyObject *
598array_positive(PyArrayObject *m1)

Callers

nothing calls this directly

Calls 2

fast_scalar_powerFunction · 0.85

Tested by

no test coverage detected