summaryrefslogtreecommitdiff
path: root/numpy/oldnumeric/rng.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-08-18 11:51:25 -0600
committerCharles Harris <charlesr.harris@gmail.com>2013-08-18 11:51:25 -0600
commitfbd6510d58a47ea0d166c48a82793f05425406e4 (patch)
tree330ce703eb02d20f96099c3fe0fc36ae33d4905b /numpy/oldnumeric/rng.py
parent8ddb0ce0acafe75d78df528b4d2540dfbf4b364d (diff)
downloadnumpy-fbd6510d58a47ea0d166c48a82793f05425406e4.tar.gz
STY: Giant comma spacing fixup.
Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long and will need to be broken at some point. OTOH, some lines were already too long and need to be broken at some point. Now seems as good a time as any to do this with open PRs at a minimum.
Diffstat (limited to 'numpy/oldnumeric/rng.py')
-rw-r--r--numpy/oldnumeric/rng.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/oldnumeric/rng.py b/numpy/oldnumeric/rng.py
index 1ffd47b27..06120798d 100644
--- a/numpy/oldnumeric/rng.py
+++ b/numpy/oldnumeric/rng.py
@@ -6,7 +6,7 @@ It is for backwards compatibility only.
"""
from __future__ import division, absolute_import, print_function
-__all__ = ['CreateGenerator','ExponentialDistribution','LogNormalDistribution',
+__all__ = ['CreateGenerator', 'ExponentialDistribution', 'LogNormalDistribution',
'NormalDistribution', 'UniformDistribution', 'error', 'ranf',
'default_distribution', 'random_sample', 'standard_generator']
@@ -21,7 +21,7 @@ class Distribution(object):
self._meth = meth
self._args = args
- def density(self,x):
+ def density(self, x):
raise NotImplementedError
def __call__(self, x):
@@ -61,7 +61,7 @@ class LogNormalDistribution(Distribution):
self._fac = 1.0/math.sqrt(2*math.pi)/self._sn
def density(x):
- m,s = self._args
+ m, s = self._args
y = (math.log(x)-self._mn)/self._sn
return self._fac*math.exp(-0.5*y*y)/x
@@ -76,7 +76,7 @@ class NormalDistribution(Distribution):
self._fac = 1.0/math.sqrt(2*math.pi)/s
def density(x):
- m,s = self._args
+ m, s = self._args
y = (x-m)/s
return self._fac*math.exp(-0.5*y*y)
@@ -97,7 +97,7 @@ class UniformDistribution(Distribution):
else:
return self._fac
-default_distribution = UniformDistribution(0.0,1.0)
+default_distribution = UniformDistribution(0.0, 1.0)
class CreateGenerator(object):
def __init__(self, seed, dist=None):