Skip to content

Commit

Permalink
Move to less stringent check of index when loading table
Browse files Browse the repository at this point in the history
  • Loading branch information
makmanalp committed Mar 28, 2016
1 parent d4cf2a2 commit 29233d5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,8 @@ def validate(self):
assert self.table.index.hasnans is False
assert self.table.index.values[0] == 0

# Use gauss's trick to check that the index is 0,1,2,3 ... n
index_size = self.table.index.size
sum_guess = (index_size - 1) * (index_size) / 2
actual_sum = sum(self.table.index)
assert sum_guess == actual_sum
# Check that index is in sorted order
assert sorted(self.table.index) == self.table.index.tolist()

assert (self.table[["name", "level", "code"]].isnull()
.any().any() == False)
Expand Down

0 comments on commit 29233d5

Please sign in to comment.