I am trying to import this data from a csv file into a 2D array:
0
1
1
0
This is my code:
Y = np.genfromtxt("output_data.csv", delimiter=",")
I am looking for a structure like this:
[[ 0. ]
[ 1. ]
[ 1. ]
[ 0. ]]
but instead it comes out like this:
[ 0. 1. 1. 0.]
As soon as I add a second column to the data it comes out the correct way. I am looking for a general solution so I don't have to program any special cases for a single column of data.
Thanks :)