Skip to content

Commit

Permalink
updated code tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alto10002 committed Jan 14, 2025
1 parent 1e1a6c7 commit 6cb8715
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/matrics_calculator/r2.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ def r2(predictor, response):
from sklearn.linear_model import LinearRegression
import numpy as np

if len(predictor) == 0 or len(response) == 0:
print('Input cannot be empty')
return None

if not isinstance(predictor, list) or not isinstance(predictor, list):
print('Input must be lists')
return None

if len(predictor) == 0 or len(response) == 0:
print('Input cannot be empty')
return None

if isinstance(predictor,list):
predictor = np.array(predictor)
Expand Down

0 comments on commit 6cb8715

Please sign in to comment.