Fix test to handle cosine better (take 2)
@@ -113,6 +113,11 @@ def test_disconnected_data(num_isolates, metric, force_approximation):
a=options, size=(10, 30), p=[0.6, 1 - 0.6]
)
# Add some disconnected data for the corner case test
+ if metric == "cosine":
+ disconnected_data = np.vstack(
+ [disconnected_data, -disconnected_data[:num_isolates]]
+ )
+ else:
disconnected_data = np.vstack(
[disconnected_data, np.zeros((num_isolates, 30), dtype="bool")]
)
