Skip to content

Commit

Permalink
[int] -= [float] doesn't do what you think it does (it implicitly cas…
Browse files Browse the repository at this point in the history
…ts the float to int). We need to weed these out.

numpy/numpy#4704
  • Loading branch information
Ben Cipollini committed Mar 10, 2015
1 parent b238259 commit 5ca84c3
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -140,7 +140,7 @@ def test_permuted_ols_check_h0_noeffect_labelswap(random_state=0):
target_var = rng.randn(n_samples, 1)
tested_var = np.arange(n_samples).reshape((-1, 1))
tested_var_not_centered = tested_var.copy()
tested_var -= tested_var.mean(0) # centered
tested_var = tested_var.astype(np.float64) - tested_var.mean(0) # centered
# permuted OLS
# We check that h0 is close to the theoretical distribution, which is
# known for this simple design (= t(n_samples - dof)).
Expand Down

0 comments on commit 5ca84c3

Please sign in to comment.