On small arrays (and these arrays are small), the code that I used is faster (because it involves a simpler code path):

<pre>
In [1]: a = np.zeros(1000)

In [2]: %timeit a.fill(1)
1000000 loops, best of 3: 1.1 us per loop

In [3]: %timeit a[:] = 1
1000000 loops, best of 3: 1.52 us per loop

In [4]: a = np.zeros(10000)

In [5]: %timeit a.fill(1)
100000 loops, best of 3: 7.08 us per loop

In [6]: %timeit a[:] = 1
100000 loops, best of 3: 7.48 us per loop

In [7]: a = np.zeros(100)

In [8]: %timeit a.fill(1)
1000000 loops, best of 3: 554 ns per loop

In [9]: %timeit a[:] = 1
1000000 loops, best of 3: 929 ns per loop
</pre>

This is a very tight loop that's fairly well optimized, so I'd rather keep the 'fill'