TEST: Increase coverage on game_theory#343
Merged
mmcky merged 8 commits intoQuantEcon:masterfrom Oct 1, 2017
Merged
Conversation
oyamad
requested changes
Sep 26, 2017
Member
oyamad
left a comment
There was a problem hiding this comment.
Thanks. I only have minor comments.
| unflattened_actions = [[1/3, 1/3, 1/3], [1/2, 1/2]] | ||
| flattened_actions = [1/3, 1/3, 1/3, 1/2, 1/2] | ||
| test_obj = _flatten_action_profile(unflattened_actions, [0, 3, 5]) | ||
| assert_allclose(test_obj, flattened_actions) |
Member
There was a problem hiding this comment.
Shouldn't this be assert_array_equal?
| from quantecon.game_theory import Player, NormalFormGame, mclennan_tourky | ||
| from quantecon.game_theory.mclennan_tourky import _best_response_selection, \ | ||
| _flatten_action_profile, \ | ||
| _is_epsilon_nash |
Member
There was a problem hiding this comment.
Maybe this should be something like
from quantecon.game_theory.mclennan_tourky import (
_best_response_selection, _flatten_action_profile, _is_epsilon_nash
)
Contributor
There was a problem hiding this comment.
thanks @oyamad I didn't know you could use ( like this.
| test_obj = _best_response_selection([1/3, 1/3, 1/3, 1/2,1/2], g) | ||
| expected_output = np.array([0., 1., 0., 0., 1.]) | ||
|
|
||
| assert_allclose(test_obj, expected_output) |
Member
There was a problem hiding this comment.
Shouldn't this be assert_array_equal?
Member
Author
|
@oyamad This is ready. |
Contributor
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.
Adds tests to increase the coverage on game_theory