diff --git a/code/working_with_data.py b/code/working_with_data.py index 5b8e8ac9..08852c3f 100644 --- a/code/working_with_data.py +++ b/code/working_with_data.py @@ -203,7 +203,7 @@ def rescaled(i, j): if stdevs[j] > 0: return (data_matrix[i][j] - means[j]) / stdevs[j] else: - return data_matrix[i][j] + return data_matrix[i][j] - means[j] # should be 0 since stdevs[j] = 0 num_rows, num_cols = shape(data_matrix) return make_matrix(num_rows, num_cols, rescaled)