I am computing an expression which I know has dimensions of (200,200) in one case hence I can initialize the array with
p = np.zeros((200,200))
what if I did not know the dimensions - is there any way to create such array without specifying the dimensions? Something like a list in java which can grow dynamically.
appendto them, but you're creating a new copy and deleting the old one each time.) If you have something that needs to constantly change in size, use alist. In many cases you may even want to use a list of arrays (e.g. appending rows of a constant size). You can always convert to an array afterwards.numpy.loadtxtto load the file into an array? Then you don't have to explicitly set the size.