P(a) = (data[i, :] - Decoded[i, :]) / (data[i, :] - Decoded[i, :]) * 100出现SyntaxError: cannot assign to function call如何解决
时间: 2024-01-14 21:03:56 浏览: 134
Java实现迅雷地址转成普通地址实例代码
The error message "SyntaxError: cannot assign to function call" typically occurs when you try to assign a value to a function call, as I mentioned in my previous response.
In your specific case, the error is likely caused by the following line of code:
```
P(a) = (data[i, :] - Decoded[i, :]) / (data[i, :] - Decoded[i, :]) * 100
```
You are trying to assign a value to a function call `P(a)`, which is not allowed in Python. To fix this error, replace `P(a)` with a variable name that you want to assign the value to. For example:
```
p_value = (data[i, :] - Decoded[i, :]) / (data[i, :] - Decoded[i, :]) * 100
```
This calculates the value you want and assigns it to the variable `p_value`.
阅读全文