Skip to content

Commit

Permalink
Merge aa2e9ed into 3324905
Browse files Browse the repository at this point in the history
  • Loading branch information
mxndrwgrdnr committed Jun 19, 2019
2 parents 3324905 + aa2e9ed commit ba6fb9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ pandas >= 0.23
patsy >= 0.4
statsmodels >= 0.8
urbansim >= 3.1
scipy < 1.3
6 changes: 5 additions & 1 deletion urbansim_templates/models/large_multinomial_logit.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,11 @@ def run(self, chooser_batch_size=None, interaction_terms=None):
self.choices = None

if interaction_terms is not None:
uniq_intx_idx_names = set([idx for intx in interaction_terms for idx in intx.index.names])
if type(interaction_terms) == list:
uniq_intx_idx_names = set([
idx for intx in interaction_terms for idx in intx.index.names])
else:
uniq_intx_idx_names = interaction_terms.index.names
obs_extra_cols = to_list(self.chooser_size) + list(uniq_intx_idx_names)
alts_extra_cols = to_list(self.alt_capacity) + list(uniq_intx_idx_names)

Expand Down

0 comments on commit ba6fb9b

Please sign in to comment.