I want to write this multidimensional array as soft code
adjust = np.array([[0.,1.,0.],
[0.,1.,0.],
[0.,1.,0.],
[0.,1.,0.],
[0.,1.,0.],
[0.,1.,0.],
[0.,1.,0.],
[0.,1.,0.],
[0.,1.,0.],
[0.,1.,0.]])
I tried np.repeat(x, 10, axis=0)
for x = [0.,1.,0.]
, it repeated them in the same bracket [ ]. Is it possible to use np.repeat here? or other numpy?
Also, is it possible to write soft code for
adjust = np.array([[0.,0.,1.,0.,0.],
[0.,0.,1.,0.,0.],
[0.,0.,1.,0.,0.]])
which I may have to expand both left and right 0 in various numbers in future?