Skip to content

Commit

Permalink
omg windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jpn-- committed Dec 1, 2023
1 parent f5ce553 commit 327d97b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion activitysim/core/los.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,14 @@ def get_mazpairs(self, omaz, dmaz, attribute):
# how="left")[attribute]

# synthetic index method i : omaz_dmaz
i = np.asanyarray(omaz) * self.maz_ceiling + np.asanyarray(dmaz)
if self.maz_ceiling > 32767:
# too many MAZs, or un-recoded MAZ ID's that are too large
# will overflow a 32-bit index, so upgrade to 64bit.
i = np.asanyarray(omaz, dtype=np.int64) * np.int64(
self.maz_ceiling
) + np.asanyarray(dmaz, dtype=np.int64)
else:
i = np.asanyarray(omaz) * self.maz_ceiling + np.asanyarray(dmaz)
s = util.quick_loc_df(i, self.maz_to_maz_df, attribute)

# FIXME - no point in returning series?
Expand Down

0 comments on commit 327d97b

Please sign in to comment.