Skip to content

Commit

Permalink
allow numpy to broadcast alt in cdap.apply_final_rules
Browse files Browse the repository at this point in the history
  • Loading branch information
jiffyclub committed May 6, 2015
1 parent bbc6ee0 commit 0149190
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions activitysim/cdap/cdap.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,7 @@ def apply_final_rules(hh_util, people, hh_id_col, final_rules):
if key in alt_match_cache:
alt_match = alt_match_cache[key]
else:
alt_match = (
np.array(utils.index.values.tolist()) ==
np.array([alt] * hh_size))
alt_match = np.array(utils.index.values.tolist()) == alt
alt_match_cache[key] = alt_match

app = np.any(np.bitwise_and(alt_match, m), axis=1)
Expand Down

0 comments on commit 0149190

Please sign in to comment.