Skip to content Skip to sidebar Skip to footer

Missing 1 Required Positional Argument For A Function

I am using Spyder IDE and call the following function in the Ipython shell after defining the input. But, I get the positional argument error! Perhaps something with the argument,

Solution 1:

You have defined get_confusion_matrix as taking 3 arguments: label, ref_label, and mask. The error is because you are only passing two arguments to it when you call it with get_confusion_matrix(label.flatten(), ref_label.flatten()).


Post a Comment for "Missing 1 Required Positional Argument For A Function"