Skip to content

Commit 4389de5

Browse files
committed
fix: improve docstring examples
1 parent e0641ef commit 4389de5

File tree

5 files changed

+980
-980
lines changed

5 files changed

+980
-980
lines changed

data/clean/f_111_armel.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ def f_111(data_matrix, n_components=2):
2929
>>> import numpy as np
3030
>>> data = np.array([[6, 8, 1, 3, 4], [-1, 0, 3, 5, 1]])
3131
>>> df, ax = f_111(data)
32-
>>> print(df)
33-
Component 1 Component 2 Mean
34-
0 5.700877 2.163271e-16 2.850439
35-
1 -5.700877 2.163271e-16 -2.850439
32+
>>> print(df["Mean"])
33+
0 2.850439
34+
1 -2.850439
35+
Name: Mean, dtype: float64
3636
"""
3737
pca = PCA(n_components=n_components)
3838
transformed_data = pca.fit_transform(data_matrix)

data/processed/43_w_doc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ def task_func(data_matrix, n_components=2):
2929
>>> import numpy as np
3030
>>> data = np.array([[6, 8, 1, 3, 4], [-1, 0, 3, 5, 1]])
3131
>>> df, ax = task_func(data)
32-
>>> print(df)
33-
Component 1 Component 2 Mean
34-
0 5.700877 2.163271e-16 2.850439
35-
1 -5.700877 2.163271e-16 -2.850439
32+
>>> print(df["Mean"])
33+
0 2.850439
34+
1 -2.850439
35+
Name: Mean, dtype: float64
3636
"""
3737
pca = PCA(n_components=n_components)
3838
transformed_data = pca.fit_transform(data_matrix)

data/raw/f_111_armel.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ def f_111(data_matrix, n_components=2):
2929
>>> import numpy as np
3030
>>> data = np.array([[6, 8, 1, 3, 4], [-1, 0, 3, 5, 1]])
3131
>>> df, ax = f_111(data)
32-
>>> print(df)
33-
Component 1 Component 2 Mean
34-
0 5.700877 2.163271e-16 2.850439
35-
1 -5.700877 2.163271e-16 -2.850439
32+
>>> print(df["Mean"])
33+
0 2.850439
34+
1 -2.850439
35+
Name: Mean, dtype: float64
3636
"""
3737
pca = PCA(n_components=n_components)
3838
transformed_data = pca.fit_transform(data_matrix)

0 commit comments

Comments
 (0)