I am new to Python and curious if there is a way to instantly create a list of numpy.random.normal values of a specific shape without using a loop like this?
def get_random_normal_values():
i = 0
result = []
while i < 100:
result.append(np.random.normal(0.0, 1.0, (16, 16, 3)))
i = i + 1
return result
(100, 16, 16, 3)? But no. And you should always use a for loop here, or even a list comprehension.