I have an array z of shape (8,):
>>> z
array([-30000. , -30000. , -30000. , -30000. ,
-27703.12304688, -27703.15429688, -27703.70703125, -27703.67382812])
I would like to copy the values 7 more times while maintaining their positions, to create an array zr of shape (8,8) e.g.:
>>> z
array([-30000. , -30000. , -30000. , -30000. ,
-27703.12304688, -27703.15429688, -27703.70703125, -27703.67382812],
[-30000. , -30000. , -30000. , -30000. ,
-27703.12304688, -27703.15429688, -27703.70703125, -27703.67382812]
.........)
I've tried np.repeat() but this creates an array of shape (64,) and I would like (8,8).
>>> zr = np.repeat(z, 8)
>>> zr
array([-30000. , -30000. , -30000. , -30000. ,
-30000. , -30000. , -30000. , -30000. ,
-30000. , -30000. , -30000. , -30000. ,
-30000. , -30000. , -30000. , -30000. ,
-30000. , -30000. , -30000. , -30000. ,
-30000. , -30000. , -30000. , -30000. ,
-30000. , -30000. , -30000. , -30000. ,
-30000. , -30000. , -30000. , -30000. ,
-27703.12304688, -27703.12304688, -27703.12304688, -27703.12304688,
-27703.12304688, -27703.12304688, -27703.12304688, -27703.12304688,
-27703.15429688, -27703.15429688, -27703.15429688, -27703.15429688,
-27703.15429688, -27703.15429688, -27703.15429688, -27703.15429688,
-27703.70703125, -27703.70703125, -27703.70703125, -27703.70703125,
-27703.70703125, -27703.70703125, -27703.70703125, -27703.70703125,
-27703.67382812, -27703.67382812, -27703.67382812, -27703.67382812,
-27703.67382812, -27703.67382812, -27703.67382812, -27703.67382812])
>>> zr.shape
(64,)
What am I doing wrong?
.reshape((8, 8))