Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Commit 7703590

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent e10f984 commit 7703590

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

tests/transform/numpy_batch/test_datetime_features.py

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,24 @@
44

55

66
def test_get_date_time_in_pi():
7-
times = np.array([
8-
"2020-01-01T00:00:00", "2020-04-01T06:00:00",
9-
"2020-07-01T12:00:00", "2020-09-30T18:00:00",
10-
"2020-12-31T23:59:59",
11-
"2021-01-01T00:00:00", "2021-04-02T06:00:00",
12-
"2021-07-02T12:00:00", "2021-10-01T18:00:00",
13-
"2021-12-31T23:59:59"
14-
]).reshape((2, 5))
15-
16-
expected_times_in_pi = np.array([0, 0.5*np.pi, np.pi, 1.5*np.pi, 2*np.pi] * 2).reshape((2,5))
7+
times = np.array(
8+
[
9+
"2020-01-01T00:00:00",
10+
"2020-04-01T06:00:00",
11+
"2020-07-01T12:00:00",
12+
"2020-09-30T18:00:00",
13+
"2020-12-31T23:59:59",
14+
"2021-01-01T00:00:00",
15+
"2021-04-02T06:00:00",
16+
"2021-07-02T12:00:00",
17+
"2021-10-01T18:00:00",
18+
"2021-12-31T23:59:59",
19+
]
20+
).reshape((2, 5))
21+
22+
expected_times_in_pi = np.array([0, 0.5 * np.pi, np.pi, 1.5 * np.pi, 2 * np.pi] * 2).reshape(
23+
(2, 5)
24+
)
1725

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

0 commit comments

Comments
 (0)