I don't think it would make much of a difference here, but here it says that http://stackoverflow.com/questions/5891410/numpy-array-initialization-fill-with-identical-values np.ones() is faster.