How do I create an array where every entry is the same value? I know numpy.ones() and numpy.zeros() do this for 1's and 0's, but what about -1?
For example:
>>import numpy as np
>>np.zeros((3,3))
array([[ 0., 0., 0.],
[ 0., 0., 0.],
[ 0., 0., 0.]])
>>np.ones((2,5))
array([[ 1., 1., 1., 1., 1.],
[ 1., 1., 1., 1., 1.]])
>>np.negative_ones((2,5))
???