79662595

Date: 2025-06-11 20:12:01
Score: 0.5
Natty:
Report link

Here is one approach that reuses the array in every call of rng.standard_normal:

import numpy as np

rng = np.random.default_rng()

size = 1000
arr = np.empty(size)
rng.standard_normal(size, out=arr)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Robert Haas