Skip to content

Commit

Permalink
correcting few mistakes for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Matteo NERI authored and Matteo NERI committed Sep 3, 2024
1 parent f088ce0 commit 77c2432
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions hoi/core/tests/test_mi.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def test_mi_gc(self, xy, biascorrect, copnorm):
@pytest.mark.parametrize("xy", [(x1, x2), (j1, j2)])
def test_mi_bin(self, xy):
mi_fcn = get_mi(method="binning")
x_binned, _ = digitize(xy[0], n_bins=3)
y_binned, _ = digitize(xy[1], n_bins=3)
x_binned = digitize(xy[0], n_bins=3)
y_binned = digitize(xy[1], n_bins=3)
mi = mi_fcn(x_binned, y_binned)
assert mi.dtype == np.float32
assert mi.shape == ()
Expand Down
3 changes: 0 additions & 3 deletions hoi/utils/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,6 @@ def digitize(x, n_bins, axis=0, use_sklearn=False, **kwargs):
return np.apply_along_axis(digitize_sklearn, axis, x, **kwargs)


partial(jax.jit, static_argnums=(1, 2))


def digitize_1d_hist(x, n_bins):
"""One dimensional digitization."""
assert x.ndim == 1
Expand Down

0 comments on commit 77c2432

Please sign in to comment.