Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: fix doc warnings #292

Merged
merged 4 commits into from
Mar 19, 2017
Merged

WIP: fix doc warnings #292

merged 4 commits into from
Mar 19, 2017

Conversation

shizejin
Copy link
Member

@shizejin shizejin commented Feb 24, 2017

fixes #287

Fix unknown sections.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 130c23e on shizejin:fix_doc into ** on QuantEcon:master**.

@mmcky mmcky self-requested a review March 1, 2017 08:01
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 26c4eb7 on shizejin:fix_doc into ** on QuantEcon:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 8817a97 on shizejin:fix_doc into ** on QuantEcon:master**.

@@ -276,8 +276,7 @@ def best_response(self, opponents_actions, tie_breaking='smallest',

Parameters
----------
opponents_actions : array_like(int or array_like(float)) or
array_like(int, ndim=1) or scalar(int)
opponents_actions : scalar(int) or array_like
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this array_like be array_like(int or float)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for comments! I am wondering whether array_like(int or float) could cover array_like(array_like(float))? If this is the case, array_like(int or float) would be better.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we ignore the maximum length 72, it would have been

        opponents_actions : scalar(int) or array_like(int, float, or array_like(foat))

See #287 (comment).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about the following format?

opponents_actions : scalar(int) or array_like
    array_like can be array_like(int, float, or array_like(foat))
    A profile of N-1 opponents' actions. If N=2, then it must be
    a 1-dimensional array of floats (in which case it is treated		             
    as the opponent's mixed action) or a scalar of integer (in

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about this:

        opponents_actions : scalar(int) or array_like
            A profile of N-1 opponents' actions, represented by either
            scalar(int), array_like(float), array_like(int), or
            array_like(array_like(float)). If N=2, then it must be a
            scalar of integer (in which case it is treated as the
            opponent's pure action) or a 1-dimensional array of floats
            (in which case it is treated as the opponent's mixed
            action). If N>2, then it must be an array of N-1 objects,
            where each object must be an integer (pure action) or an
            array of floats (mixed action).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oyamad I agree - I think that is excellent.

@mmcky
Copy link
Contributor

mmcky commented Mar 15, 2017

Thanks @shizejin. This is a good PR. Just had one question above.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling d69f156 on shizejin:fix_doc into ** on QuantEcon:master**.

@mmcky
Copy link
Contributor

mmcky commented Mar 19, 2017

Thanks @shizejin and @oyamad.

@mmcky mmcky merged commit 488b7b3 into QuantEcon:master Mar 19, 2017
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.

Fix doc warnings
4 participants