I’m no expert in distributions, but from the docs covariance_matrix should be a positive-definite covariance matrix, which would not be the case for:
torch.diagflat(sigma)
> tensor([[-1.0122]])

Also, shouldn’t the covariance matrix be the variance in this case (which would also make it positive definite)?
This should yield the same result:
z = torch.distributions.MultivariateNormal(mu, covariance_matrix=torch.diagflat(sigma**2))