FIX (game_theory): fix polym_lcp_solver type hints in howson_lcp#824
Open
mnshkw wants to merge 6 commits intoQuantEcon:mainfrom
Open
FIX (game_theory): fix polym_lcp_solver type hints in howson_lcp#824mnshkw wants to merge 6 commits intoQuantEcon:mainfrom
polym_lcp_solver type hints in howson_lcp#824mnshkw wants to merge 6 commits intoQuantEcon:mainfrom
Conversation
polym_lcp_solver type hints in howson_lcppolym_lcp_solver type hints in howson_lcp
Fix for clarity.
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the type annotation for polym_lcp_solver in quantecon.game_theory.howson_lcp so static typing matches the function’s two return modes (full_output=False vs True) in the game theory solvers.
Changes:
- Fix
polym_lcp_solverreturn type hint to representNEvs(NE, NashResult)accurately. - Adjust the docstring “Returns” section to better reflect the intended outputs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR fixes the return type annotation of
polym_lcp_solverinquantecon.game_theory.howson_lcpso that it matches the function’s actual return values.This is a typing-only change.
Motivation
polym_lcp_solverreturns:NE(a tuple of per-player mixed strategies) whenfull_output=False(NE, NashResult)whenfull_output=TrueThe previous type hint did not accurately represent the
full_output=Truecase.Changes
NEastuple[NDArray, ...]full_output=Truecase as a 2-tuple(NE, NashResult)Notes for Reviewers
All codes and documentation are written with assistance by LLMs.