Skip to content

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

Merged
smmaurer merged 4 commits into
UDST:mainfrom
hanase:max-profit-fix
Sep 15, 2026
Merged

smmaurer merged 4 commits into
UDST:mainfrom
hanase:max-profit-fix

Conversation

@hanase

@hanase hanase commented May 3, 2017

Copy link
Copy Markdown
Contributor

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.

@coveralls

coveralls commented May 3, 2017

Copy link
Copy Markdown

Coverage Status

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

@Eh2406

Eh2406 commented May 3, 2017

Copy link
Copy Markdown
Contributor

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

Fine-tunes the fix so that the original form=None use case (flat table
of attributes for a single form) continues to work, just in case anyone
is using it.
@smmaurer
smmaurer changed the base branch from master to main September 15, 2026 19:26
@smmaurer
smmaurer merged commit 18f2436 into UDST:main Sep 15, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants