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

Docstrings: improvement rv_discrete #312

Merged
merged 4 commits into from
Sep 22, 2012
Merged

Conversation

sciunto
Copy link
Contributor

@sciunto sciunto commented Sep 16, 2012

Hi,

From my point of view, the docstring of class rv_discrete() was poorly understandable.

The problem was:
Most of examples were not directly executable and mostly illustrated the ' Alternatively' section in notes.

In the new version,

  • It starts with a distribution from a list.
  • I use the notation xk, pk, easily understandable and already used previously in the doc.
  • The 'alternatively' section is now at the end of the Notes (it's an alternative ;) )
  • A typo fixed :)

I have not fully understood yet examples using <shape(s)>. But I think we must avoid examples that could not be executed "out of the box". For the moment, still there...

François.

@rgommers
Copy link
Member

Could you tweak the example a little to use standard namespaces? So

from scipy import stats
np.arange(...
stats.rv_discrete(...

Other than that this looks good.

@sciunto
Copy link
Contributor Author

sciunto commented Sep 22, 2012

Updated :)

rgommers added a commit that referenced this pull request Sep 22, 2012
Improvements to the stats.rv_discrete docstring.
@rgommers rgommers merged commit 2e9a4b5 into scipy:master Sep 22, 2012
@rgommers
Copy link
Member

Thanks, merged.

mckib2 added a commit to mckib2/scipy that referenced this pull request Apr 12, 2020
189d6572b Merge pull request #22 from ERGO-Code/master
471f6e0e8 Remove std::make_unique to make c++11 compliant
0dc437abd Merge pull request scipy#312 from matbesancon/fixc99
7aae34645 Merge pull request scipy#309 from rgommers/fix-warning
9d8e58009 Merge pull request scipy#314 from ERGO-Code/presolveCleanBounds
30341c9dc Remove example scripts folder
47b3dda38 Remove defunct test
cc0cc7011 Fix optimizations typo for windows
afe87ff14 Add compiler optimizations for gcc/msvc
0eac2850f Ignore cython generated files for HiGHS integration
7a9a8cc47 Merge commit 'a15ff5a21d283f4dde76e0d4b89f1eeb67ead77a' into embed-highs
c9c4c8d0d Merge commit 'dc7fece0a7822e2e60c5714bd400c73512b8b2ff' into embed-highs
b43bca6fe fix class to struct
94670da58 Revert "fix struct to class"
c6c2873aa fix struct to class
246622607 fix c99 error
98ae809b0 Fix a build warning in lp_solver.cc with GCC 9
456a6f0f3 Merge branch 'linprog_highs' of https://github.com/mdhaber/scipy into mdhaber-linprog_highs
d42f1a19f PEP8: optimize: linprog HiGHS PEP8 fixes

git-subtree-dir: scipy/optimize/_highs
git-subtree-split: 189d6572b984e75e811b2ea92edc3fc343229ea1
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.

2 participants