Skip to content

Commit

Permalink
np.alltrue -> np.all
Browse files Browse the repository at this point in the history
  • Loading branch information
lostella committed Oct 17, 2024
1 parent 71f0471 commit 08c1ece
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/transform/test_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ def test_AddTimeFeatures(start, target, is_train: bool):
tmp_idx = pd.period_range(
start=start, freq=start.freq, periods=expected_length
)
assert np.alltrue(mat[0] == time_feature.day_of_week(tmp_idx))
assert np.alltrue(mat[1] == time_feature.day_of_month(tmp_idx))
assert np.all(mat[0] == time_feature.day_of_week(tmp_idx))
assert np.all(mat[1] == time_feature.day_of_month(tmp_idx))


@pytest.mark.parametrize("is_train", TEST_VALUES["is_train"])
Expand Down Expand Up @@ -285,7 +285,7 @@ def test_InstanceSplitter(

# expected_length = len(target) + (0 if is_train else pred_length)
# assert len(out['age']) == expected_length
# assert np.alltrue(out['age'] == np.log10(2.0 + np.arange(expected_length)))
# assert np.all(out['age'] == np.log10(2.0 + np.arange(expected_length)))


@pytest.mark.parametrize("is_train", TEST_VALUES["is_train"])
Expand Down

0 comments on commit 08c1ece

Please sign in to comment.