Gowtham Jawaharram
Gowtham Jawaharram

Reputation: 1

How do I generate a 2D Gaussian with a mean 50 and standard deviation of 5

I would like to create a 2D Gaussian array with a mean of 50 and a standard deviation of 5. How is this possible? The size of the array is 50x50

Upvotes: 0

Views: 1618

Answers (1)

Ami Tavory
Ami Tavory

Reputation: 76297

Use numpy.random.randn:

import numpy
import math

50 + 5 * numpy.random.randn(50, 50)

Upvotes: 2

Related Questions