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

Function _PyArray_GetNumericOps

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

Source from the content-addressed store, hash-verified

142 goto fail;
143
144NPY_NO_EXPORT PyObject *
145_PyArray_GetNumericOps(void)
146{
147 PyObject *dict;
148 if ((dict = PyDict_New())==NULL)
149 return NULL;
150 GET(add);
151 GET(subtract);
152 GET(multiply);
153 GET(divide);
154 GET(remainder);
155 GET(divmod);
156 GET(power);
157 GET(square);
158 GET(reciprocal);
159 GET(_ones_like);
160 GET(sqrt);
161 GET(negative);
162 GET(positive);
163 GET(absolute);
164 GET(invert);
165 GET(left_shift);
166 GET(right_shift);
167 GET(bitwise_and);
168 GET(bitwise_or);
169 GET(bitwise_xor);
170 GET(less);
171 GET(less_equal);
172 GET(equal);
173 GET(not_equal);
174 GET(greater);
175 GET(greater_equal);
176 GET(floor_divide);
177 GET(true_divide);
178 GET(logical_or);
179 GET(logical_and);
180 GET(floor);
181 GET(ceil);
182 GET(maximum);
183 GET(minimum);
184 GET(rint);
185 GET(conjugate);
186 GET(matmul);
187 GET(clip);
188 return dict;
189
190 fail:
191 Py_DECREF(dict);
192 return NULL;
193}
194
195/*NUMPY_API
196 Get dictionary showing number functions that all arrays will use

Callers 2

array_set_ops_functionFunction · 0.85
PyArray_GetNumericOpsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected