I need to create a NumPy array of length
n, each element of which is
Is there anything better than:
a = empty(n) for i in range(n): a[i] = v
ones would work for v = 0, 1. I could use
v * ones(n), but it
won’t work when would be much slower.
None, and also