Docstrings: improvement rv_discrete #312

Merged
merged 4 commits into from Sep 22, 2012

2 participants

@sciunto

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 . But I think we must avoid examples that could not be executed "out of the box". For the moment, still there...

François.

@rgommers
SciPy 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.

François Boulogne Docstring: std namespace d4a7b62
@sciunto

Updated :)

@rgommers rgommers merged commit 2e9a4b5 into scipy:master Sep 22, 2012
@rgommers
SciPy member

Thanks, merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment