Assuming that your GBM is given by
$$S_{T}=S_{0}e^{(r -{\frac {\sigma ^{2}}{2}})T+\sigma W_{T}}$$
then its mean and variance are:
$${Mean=S_{0}e^{r T},}$$
$$
{Variance=S_{0}^{2}e^{2r T}\left(e^{\sigma ^{2}T}-1\right)}{\displaystyle}$$
You cannot paste these values directly into np.random.lognormal because in this case the parameters $\mu$ and $\sigma^2$ do not represent the mean and variance of the random variable. You actually need to simulate $W_T\sim N(0,T)$ and plug these values into $S_T$.
For the Normal distribution it is only by coincidence that the estimator for $\mu$ and $\sigma$ are the mean and variance; the same does not hold for the Lognormal distribution https://docs.scipy.org/doc/numpy-1.14.1/reference/generated/numpy.random.lognormal.html:
"Draw samples from a log-normal distribution with specified mean, standard deviation, and array shape. Note that the mean and standard deviation are not the values for the distribution itself, but of the underlying normal distribution it is derived from."
To simulate from the Lognormal distribution of $S_T$, note that $\ln S_T$ is normally distributed:
$$\ln S_{T}=\ln S_{0}+(r -{\frac {\sigma ^{2}}{2}})T+\sigma W_{T}\sim N(\ln S_{0}+(r -{\frac {\sigma ^{2}}{2}})T,\sigma T)$$
Hence you need to call:
np.random.lognormal(ln S_0+(r-sigma^2/2)*T, sigma*T)