I mean that in whatever code you end up writing, instead of writing code to
do the attribute lookup in some cases and not others, you should use our
existing function for doing fast attribute lookup. (And maybe make it
faster.)
On 18 Jul 2013 17:20, "Blake Griffith" <notifications@github.com> wrote:

> In numpy/core/src/private/ufunc_override.h:
>
> > +NPY_NO_EXPORT PyObject *
> > +PyUFunc_GetOverride(PyObject *ufunc, PyObject *args, PyObject *kwds)
> > +{
> > +    int i;
> > +    int nargs = PyTuple_GET_SIZE(args);
> > +    int noa = 0;
> > +    PyObject *obj;
> > +    PyObject *with_override[NPY_MAXARGS], *overrides[NPY_MAXARGS];
> > +    PyObject *override = NULL, *override_dict = NULL;
> > +
> > +    for (i = 0; i < nargs; i++) {
> > +        obj = PyTuple_GET_ITEM(args, i);
> > +        if (PyArray_CheckExact(obj) || PyArray_IsAnyScalar(obj)) {
> > +            continue;
> > +        }
> > +        override_dict = PyObject_GetAttrString(obj, "__ufunc_override__");
>
> This function actually being removed, it implemented my previous dict
> look-up approach. But, I do check for PyArray_CheckExact, line 74, is
> that what you mean?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/numpy/numpy/pull/3524/files#r5270580>
> .
>