None would be at least as slow float, so it makes a difference,
and like you said, the test is very cheap.

In [3]: %timeit numpy.array([None]*100000)
100 loops, best of 3: 6.04 ms per loop

In [4]: %timeit numpy.array([0.0]*100000)
100 loops, best of 3: 8.9 ms per loop



On Fri, Jun 7, 2013 at 5:06 AM, seberg <notifications@github.com> wrote:

> In numpy/core/src/multiarray/common.c:
>
> > @@ -156,8 +198,17 @@
> >          goto promote_types;
> >      }
> >
> > +    /* See if it's a python None */
> > +    if (obj == Py_None) {
>
> Just wondering, does this really make a real difference for your timings?
> Somehow it doesn't seem to me that None is all that special (but the check
> is very cheap and clear so...). I know None is special for you, just
> generally.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/numpy/numpy/pull/3410/files#r4585177>
> .
>