Skip to content

Commit 72192c5

Browse files
committed
fixed errors in unit tests
1 parent 294f13d commit 72192c5

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

tests/sklearn_extensions/test_log_standard_scaler.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77

88

99
@fixture(scope="session")
10-
def make_log_normal_array() -> np.ndarray:
10+
def make_log_normal_array() -> pd.DataFrame:
1111
np.random.seed(32123)
12-
return np.random.lognormal(mean=2, sigma=4, size=5).reshape(-1, 1)
12+
return pd.DataFrame(
13+
data=np.random.lognormal(mean=2, sigma=4, size=5).reshape(-1, 1),
14+
columns=["X"]
15+
)
1316

1417

1518
def test_log_standard_scaler_no_shift(make_log_normal_array):
@@ -42,8 +45,3 @@ def test_log_standard_scaler_with_shift_and_base(make_log_normal_array):
4245
assert round(float(X_trfmd[0, 0]), 8) == 7.12454284
4346
assert X_trfmd.shape == (5, 1)
4447
assert round(float(X_trfmd[-1, 0]), 8) == 7.1258186
45-
46-
47-
def test_use_of_log_standard_scaler_in_column_transformer(make_log_normal_array):
48-
data: pd.DataFrame = pd.DataFrame(data={"X": make_log_normal_array})
49-
lss: LogStandardScaler = LogStandardScaler(log_base=2, shift=20)

0 commit comments

Comments
 (0)