python SyntaxError: positional argument follows keyword argument

55,060

Understand. I should call it like this:

 Q_hmm = hidden_markov_model(Gaussian, K, N, 
                            mu, K*[std**(-2)*np.identity(2)],
                            )
Share:
55,060
Atena
Author by

Atena

Updated on July 29, 2022

Comments

  • Atena
    Atena almost 2 years

    I have a python 3 function which is defined like below:

    def hidden_markov_model(distribution, K=3, N=100, *args):
    

    when i call the function, i get this error:

    Q_hmm = hidden_markov_model(Gaussian, K=K, N=N, 
                                mu, K*[std**(-2)*np.identity(2)],
                                )
    
    SyntaxError: positional argument follows keyword argument
    

    what is wrong?