Skip to content

Commit

Permalink
Minimal changes to get some tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromekelleher committed Sep 19, 2024
1 parent bb5b603 commit 8401ff7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion python/_tskitmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -9703,7 +9703,12 @@ TreeSequence_weighted_stat_vector_method(
goto out;
}
err = method(self->tree_sequence, w_shape[1], PyArray_DATA(weights_array),
num_windows, PyArray_DATA(windows_array), PyArray_DATA(result_array), options);
/* num_windows, PyArray_DATA(windows_array), */
/* FIXME! The C code has a bug_assert on windows being NULL, and
* it looks like you're not testing anything with windows so far
* anyway, so there's no point in these parameters?
*/
0, NULL, PyArray_DATA(result_array), options);
if (err != 0) {
handle_library_error(err);
goto out;
Expand Down
4 changes: 3 additions & 1 deletion python/tests/test_relatedness_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,11 @@ def verify_relatedness_vector(
print("weights:", w)
print("here:", R1)
print("with ts:", R2)
print("with lib:", R3)
print("Sigma:", Sigma)
np.testing.assert_allclose(R1, R2, atol=1e-14)
np.testing.assert_allclose(R1, R3)
# FIXME! Which shape is correct?
np.testing.assert_allclose(R1.reshape(R3.shape), R3)
return R1


Expand Down

0 comments on commit 8401ff7

Please sign in to comment.