I would like to generate many batches of random numbers. I only need access to one batch at a time. Naively, I could repeatedly call np.random.randn(size), but that allocates an array each time. For performance, I would like to populate an existing array with something like np.random.randn(size, out=arr), but that form of randn doesn't seem to exist. How can I fill an existing array with random numbers? Continue reading...