Skip to content

Commit

Permalink
Merge branch 'master' into 20161109_fix_remove
Browse files Browse the repository at this point in the history
fix failed tests by updated pandas diff
  • Loading branch information
Moritz Kirmse authored and Moritz Kirmse committed Nov 21, 2016
2 parents 73892f4 + caa6ab8 commit 8b651c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
'matplotlib>=1.3.1',
'numpy>=1.8.0',
'orca>=1.1',
'pandas>=0.13.1',
'pandas>=0.15.0',
'patsy>=0.2.1',
'prettytable>=0.7.2',
'pyyaml>=3.10',
Expand Down
2 changes: 1 addition & 1 deletion urbansim/models/transition.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def remove_rows(data, nrows, accounting_column=None):
remove_index = remove_rows.index

logger.debug('finish: removed {} rows in transition model'.format(nrows))
return data.loc[data.index.diff(remove_index)], remove_index
return data.loc[data.index.difference(remove_index)], remove_index


def add_or_remove_rows(data, nrows, starting_index=None, accounting_column=None):
Expand Down
4 changes: 2 additions & 2 deletions urbansim/utils/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def assert_index_equal(left, right):
"""
assert isinstance(left, pd.Index)
assert isinstance(right, pd.Index)
left_diff = left.diff(right)
right_diff = right.diff(left)
left_diff = left.difference(right)
right_diff = right.difference(left)
if len(left_diff) > 0 or len(right_diff) > 0:
raise AssertionError("keys not in left [{0}], keys not in right [{1}]".format(
left_diff, right_diff))

0 comments on commit 8b651c4

Please sign in to comment.