urbansim icon indicating copy to clipboard operation
urbansim copied to clipboard

Compute max-profit over all forms if "form" is None

Open hanase opened this issue 8 years ago • 2 comments

This was a bug: If the argument "form" is None, the max profit should be computed over all forms.

When calling the function with form=None, the original code failed at the line df = df[df.max_profit_far > 0], since df.max_profit_far does not exist.

hanase avatar May 03 '17 00:05 hanase

Coverage Status

Coverage increased (+0.04%) to 94.335% when pulling d563ce73dc0f7ed4ee22f1569d1fc559ed57483b on hanase:max-profit-fix into d9a058bf24c03b1a03ea8a09527de28b1ed4736f on UDST:master.

coveralls avatar May 03 '17 00:05 coveralls

Good Catch! Maybe we should add a test to keep this from breaking again?

Eh2406 avatar May 03 '17 16:05 Eh2406