Skip to content

Commit

Permalink
merging
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Nov 6, 2016
2 parents 6eb5b61 + 3a0fce1 commit 41aadad
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions wc_utils/util/rand.py
Expand Up @@ -96,6 +96,7 @@ def round_midpoint(self, x):
Round a float to the closest integer. If the fractional part of `x` is 0.5, randomly
round `x` up or down. This avoids rounding bias.
See http://www.clivemaxfield.com/diycalculator/sp-round.shtml#A15
Args:
x (:obj:`float`): a value to be rounded
Expand Down Expand Up @@ -125,6 +126,18 @@ def round_poisson(self, x):

return self.poisson(x)

def poisson_round( self, x ):
'''Poisson round a float
Round a float to the closest integer.
Args:
x (float): a value to be poission rounded
Returns:
int: a random round of x
'''
pass


def validate_random_state(random_state):
""" Validates a random state
Expand Down

0 comments on commit 41aadad

Please sign in to comment.