Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 6, 2024
1 parent e10f984 commit 7703590
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions tests/transform/numpy_batch/test_datetime_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,24 @@


def test_get_date_time_in_pi():
times = np.array([
"2020-01-01T00:00:00", "2020-04-01T06:00:00",
"2020-07-01T12:00:00", "2020-09-30T18:00:00",
"2020-12-31T23:59:59",
"2021-01-01T00:00:00", "2021-04-02T06:00:00",
"2021-07-02T12:00:00", "2021-10-01T18:00:00",
"2021-12-31T23:59:59"
]).reshape((2, 5))

expected_times_in_pi = np.array([0, 0.5*np.pi, np.pi, 1.5*np.pi, 2*np.pi] * 2).reshape((2,5))
times = np.array(
[
"2020-01-01T00:00:00",
"2020-04-01T06:00:00",
"2020-07-01T12:00:00",
"2020-09-30T18:00:00",
"2020-12-31T23:59:59",
"2021-01-01T00:00:00",
"2021-04-02T06:00:00",
"2021-07-02T12:00:00",
"2021-10-01T18:00:00",
"2021-12-31T23:59:59",
]
).reshape((2, 5))

expected_times_in_pi = np.array([0, 0.5 * np.pi, np.pi, 1.5 * np.pi, 2 * np.pi] * 2).reshape(
(2, 5)
)

times = times.astype("datetime64[s]")

Expand Down

0 comments on commit 7703590

Please sign in to comment.