I want to start with an empty 2D NumPy array, and then add some rows to it. However, so far I have only been able to do this with a 1D array. Here is what I have tried so far:
a = numpy.array([])
a = numpy.append(a, [1, 2])
a = numpy.append(a, [8, 8])
print a
The output I get is:
[1, 2, 8, 8]
Whereas I want the output to be:
[[1, 2], [8, 8]]
How can I do this?