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

Function _GenericBinaryOutFunction

numpy/core/src/multiarray/calculation.c:786–815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

784
785
786static PyObject *
787_GenericBinaryOutFunction(PyArrayObject *m1, PyObject *m2, PyArrayObject *out,
788 PyObject *op)
789{
790 if (out == NULL) {
791 return PyObject_CallFunction(op, "OO", m1, m2);
792 }
793 else {
794 PyObject *args, *ret;
795 static PyObject *kw = NULL;
796
797 if (kw == NULL) {
798 kw = Py_BuildValue("{s:s}", "casting", "unsafe");
799 if (kw == NULL) {
800 return NULL;
801 }
802 }
803
804 args = Py_BuildValue("OOO", m1, m2, out);
805 if (args == NULL) {
806 return NULL;
807 }
808
809 ret = PyObject_Call(op, args, kw);
810
811 Py_DECREF(args);
812
813 return ret;
814 }
815}
816
817static PyObject *
818_slow_array_clip(PyArrayObject *self, PyObject *min, PyObject *max, PyArrayObject *out)

Callers 1

_slow_array_clipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected