It seems that these options are not optional.
If I pass the default values ββfor meanand cov, for example:
import numpy as np
from scipy.stats import multivariate_normal as mvnorm
x = np.random.rand(5)
mvnorm.pdf(x, mean=0, cov=1)
I get the following output:
array([ 0.35082878, 0.27012396, 0.26986049, 0.39887847, 0.36116341])
Using:
import numpy as np
from scipy.stats import multivariate_normal as mvnorm
x = np.random.rand(5)
mvnorm.pdf(x)
gives the same error:
TypeError: pdf() takes at least 4 arguments (2 given)
source
share