Can't we use PyArray_GetAttrString_SuppressException instead of
reimplementing it?


On Sun, Feb 2, 2014 at 5:37 PM, Charles Harris <notifications@github.com>wrote:

> In numpy/core/src/private/ufunc_override.h:
>
> > @@ -59,7 +59,8 @@
> >
> >      for (i = 0; i < nargs; ++i) {
> >          obj = PyTuple_GET_ITEM(args, i);
> > -        if (PyArray_CheckExact(obj) || PyArray_IsAnyScalar(obj)) {
> > +        if (PyArray_CheckExact(obj) || PyArray_IsScalar(obj, Generic) ||
> > +            _is_basic_python_type(obj)) {
>
> Python sequence types now pass through this check, where before it was
> just python numbers and strings. Is that correct?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/numpy/numpy/pull/4255/files#r9370815>
> .
>



-- 
Nathaniel J. Smith
Postdoctoral researcher - Informatics - University of Edinburgh
http://vorpus.org