Skip to content

Commit

Permalink
nan prob fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zneedell committed Jul 29, 2024
1 parent 2bd026e commit 53aa11d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion activitysim/core/interaction_sample_simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def interaction_sample_simulate(
alternatives,
spec,
choice_column,
allow_zero_probs=False,
allow_zero_probs=True,
zero_prob_choice_val=None,
log_alt_losers=False,
want_logsums=False,
Expand Down
4 changes: 2 additions & 2 deletions activitysim/core/logit.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ def make_choices(
trace_choosers=trace_choosers,
raise_error=False
)
bad_probs[bad_probs, :] = 0
bad_probs[bad_probs, 0] = 1
bad_probs.loc[bad_probs, :] = 0
bad_probs.loc[bad_probs, 0] = 1

rands = state.get_rn_generator().random_for_df(probs)

Expand Down

0 comments on commit 53aa11d

Please sign in to comment.