Extend display options for probability distributions

Issue #78 resolved
Pierre Denis repo owner created an issue

It would be interesting to have an option to display probability distributions in a single line, instead of having one line per value / probability. This would be especially interesting in interactive sessions, for distributions having a small set of values, e.g.

>>> lea.binom(4,"1/4")
{ 0: 81/256, 1: 108/256, 2: 54/256, 3: 12/256, 4: 1/256 }

Also, independently, it would be convenient to be able to set display options once for all, through a dedicated function. This could have the same arguments as as_string instance method, with a new one_line argument for the enhancement proposed above.

Comments (4)

  1. Log in to comment