Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This address #285 to fix overflows when calculating the memory footprint for the skims. This replaces the Numpy.prod method with a straight Python integer multiplication to let Python handle the growth of the integer value under the hood.
This conversation on Stack Overflow provides a good synopsis of the problem and the solution.
Rather than replace Numpy prod in line with the multiplication, I created a short method to do multiplication that might result in big numbers. This understandably may not be the most elegant solution, but it does allow me to write a test around the problem.
Review Criteria Responses
Does it contain all the required elements, including a runnable example, documentation, and tests?
This code doesn't change the examples or documentation. It is a background fix to eradicate a bug. A test has been written to prove that it works.
Does it implement good methods (i.e. is it consistent with good practices in travel modeling)?
Yes. It allows for ActivitySim to support much larger implementations.
Are the runtimes reasonable and does it provide documentation justifying this claim?
This change has no material impact on runtimes.
Does it include non-Python code, such as C/C++? If so, does it compile on any OS and are compilation instructions included?
No. This is a Python-only change.
Is it licensed with the ActivitySim license that allows the code to be freely distributed and modified and includes attribution so that the ‘provenance’ of the code can be tracked? Does it include an official release of ownership from the funding agency if applicable?
This work was done under contract to ARC, and, presumably, ARC is providing the changes without any additional licensing beyond the existing ActivitySim licensing.
Does it appropriately interact with the data pipeline (i.e. it doesn't create new ways of managing data)?
This change does not impact the data pipeline.
Does it include regression tests to enable checking that consistent results will be returned when updates are made to the framework?
No regression testing has been done. The code change fix a bug that results in incorrect arithmetic in certain situations.
Does it include sufficient test coverage and test data for existing and proposed features?
Yes, a test was written along with scaffolding to test other methods in the skims.py file.
Any other comments or suggestions for improving the developer experience?
No