Skip to content

Commit 0149190

Browse files
committed
allow numpy to broadcast alt in cdap.apply_final_rules
1 parent bbc6ee0 commit 0149190

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

activitysim/cdap/cdap.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,7 @@ def apply_final_rules(hh_util, people, hh_id_col, final_rules):
267267
if key in alt_match_cache:
268268
alt_match = alt_match_cache[key]
269269
else:
270-
alt_match = (
271-
np.array(utils.index.values.tolist()) ==
272-
np.array([alt] * hh_size))
270+
alt_match = np.array(utils.index.values.tolist()) == alt
273271
alt_match_cache[key] = alt_match
274272

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

0 commit comments

Comments
 (0)