Opened 10 years ago

Closed 10 years ago

#6827 closed enhancement (fixed)

[with patch, positive review] probability distributions doctests + general discrete distribution

Reported by: carlohamalainen Owned by: mhampton
Priority: minor Milestone: sage-4.1.2
Component: statistics Keywords:
Cc: Merged in: Sage 4.1.2.alpha2
Authors: Carlo Hamalainen Reviewers: Mike Hansen
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

This patch attends to sage/gsl/probability_distribution.pyx:

  • 100% doctest coverage (previously this file had nodoctest)
  • fixed formatting (all indents now 4 spaces).
  • ReST docstring formatting.
  • One extra class: general discrete distributions (I think that #6662 should be marked as invalid since the code there fits better here).
  • valgrind ok
  • probability_distribution.pyx added to the reference manual under Probability.

Attachments (2)

probability_distribution.patch (57.9 KB) - added by carlohamalainen 10 years ago.
trac_6827_review.patch (628 bytes) - added by mhansen 10 years ago.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by carlohamalainen

Changed 10 years ago by mhansen

comment:1 Changed 10 years ago by mhansen

  • Authors set to Carlo Hamalainen
  • Reviewers set to Mike Hansen
  • Summary changed from [with patch, needs review] probability distributions doctests + general discrete distribution to [with patch, positive review] probability distributions doctests + general discrete distribution

Looks good to me. I added a one character change to get the docs to build without warning. Both patches should be applied.

It would probably be good to factor each of the RealDistributions? out into their own classes so we don't have to have the massive if/elif/else statements. It might be a good easy project if someone is working on stats stuff this fall.

comment:2 Changed 10 years ago by mvngu

  • Merged in set to Sage 4.1.2.alpha2
  • Resolution set to fixed
  • Status changed from new to closed

Merged patches in this order:

  1. probability_distribution.patch
  2. trac_6827_review.patch
Note: See TracTickets for help on using tickets.