| Conditions | 1 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | """Tests for pyswarm.""" |
||
| 19 | def myfunc(input_vector): |
||
| 20 | """Simple function for tests. |
||
| 21 | |||
| 22 | Args: |
||
| 23 | input_vector (list): input vector |
||
| 24 | |||
| 25 | Returns: |
||
| 26 | object : value of function |
||
| 27 | """ |
||
| 28 | x_1 = input_vector[0] |
||
| 29 | x_2 = input_vector[1] |
||
| 30 | return x_1 ** 4 - 2 * x_2 * x_1 ** 2 + x_2 ** 2 + x_1 ** 2 - 2 * x_1 + 5 |
||
| 31 |
This happens when the amount of values does not equal the amount of labels: