This comment is hidden because it contains spoiler information about the solution
Correction: there is no need to assume a <= b in the function definitions.
Ah I see. Thanks!
yonax, you uncovered a nasty bug. I have fixed it and added the test cases discussed above to the kata.
This was due to an issue in my logic for solving the problem. It has been corrected, and the kata has been republished.
To confirm,
vector_affinity([None], []) == 0.0 => True
I am republishing the kata now, with this issue resolved.
Yes, I will file this as an issue.
The problem is that the solution is looking for equality in the terms of each vector. Comparing None to a non-existent value will equate to True since they are both NoneType.
None
True
I've got a failed test with
[None] [] 0.0 should equal 1.0
But reading the posts isn't 0.0 the intended result here?
Loading collection data...
This comment is hidden because it contains spoiler information about the solution
Correction: there is no need to assume a <= b in the function definitions.
Ah I see. Thanks!
yonax, you uncovered a nasty bug. I have fixed it and added the test cases discussed above to the kata.
This was due to an issue in my logic for solving the problem. It has been corrected, and the kata has been republished.
To confirm,
I am republishing the kata now, with this issue resolved.
Yes, I will file this as an issue.
The problem is that the solution is looking for equality in the terms of each vector.
Comparing
None
to a non-existent value will equate toTrue
since they are both NoneType.I've got a failed test with
[None] []
0.0 should equal 1.0
But reading the posts isn't 0.0 the intended result here?