I have two arrays in python, one consists of 1's the other of float values, i concatenated them and got following array:
[[0.122700 0.242400 0.000200 0.247300 0.758100 0.212200 1.000000]
[0.276400 0.359800 0.005500 0.525200 0.787100 0.272700 1.000000]]
I would like for it to look like so:
[[0.122700, 0.242400, 0.000200, 0.247300, 0.758100, 0.212200], [1.000000]],
[[0.276400, 0.359800, 0.005500, 0.525200, 0.787100, 0.272700], [1.000000]]
since that's how the input set looks like in a NN that i'm looking to use, fragment of code of NN:
def demo():
# Teach network XOR function
testinput = [
[[0,0], [0]],
[[0,1], [1]],
[[1,0], [1]],
[[1,1], [0]]
]`
How can i accomplish this? Here's the code for the arrays:
array12 = np.ones((17,1))
array1t = np.hstack((array11color,array11diameter,array11compactness, array11asymmetry,array11solidity,array11extent))
np.set_printoptions(formatter={'float_kind':'{:f}'.format})
array2t = np.concatenate((array1t, array12), axis=1)
print(array2t)