How to add a new row to an empty numpy array
The way to “start” the array that you want is: Which is an empty array but it has the proper dimensionality. Then be sure to append along axis 0: But, @jonrsharpe is right. In fact, if you’re going to be appending in a loop, it would be much faster to append to a list as … Read more