Skip to content

Commit

Permalink
use .shape instead of len() when do shape eval
Browse files Browse the repository at this point in the history
  • Loading branch information
XianBW committed Jan 8, 2025
1 parent 56d57ac commit 6d8f476
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


# Validate the conditions mentioned in the docstring
assert len(X_test) == len(test_ids), "Mismatch in length of test images and test IDs"
assert len(X) == len(y), "Mismatch in length of training images and labels"
assert X_test.shape[0] == test_ids.shape[0], "Mismatch in length of test images and test IDs"

This comment has been minimized.

Copy link
@WinstonLiyt

WinstonLiyt Jan 9, 2025

Collaborator

AttributeError: 'list' object has no attribute 'shape'

assert X.shape[0] == y.shape[0], "Mismatch in length of training images and labels"

print("Feature Engineering test passed successfully. Length of test images matches length of test IDs.")
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
X, y, X_test, test_ids = load_data()

# Validate the conditions mentioned in the docstring
assert len(X_test) == len(test_ids), "Mismatch in length of test images and test IDs"
assert len(X) == len(y), "Mismatch in length of training images and labels"
assert X_test.shape[0] == test_ids.shape[0], "Mismatch in length of test images and test IDs"
assert X.shape[0] == y.shape[0], "Mismatch in length of training images and labels"

print("Data loader test passed successfully. Length of test images matches length of test IDs.")

Expand Down

0 comments on commit 6d8f476

Please sign in to comment.