Skip to content
Snippets Groups Projects
Commit a5edfc6c authored by Martin Reinecke's avatar Martin Reinecke
Browse files

bug fix

parent a06601c5
No related branches found
No related tags found
No related merge requests found
...@@ -47,7 +47,7 @@ class Random(object): ...@@ -47,7 +47,7 @@ class Random(object):
@staticmethod @staticmethod
def uniform(dtype, shape, low=0., high=1.): def uniform(dtype, shape, low=0., high=1.):
if issubclass(dtype, (complex, np.complexfloating)): if issubclass(dtype, (complex, np.complexfloating)):
x = np.empty(size, dtype=dtype) x = np.empty(shape, dtype=dtype)
x.real = (high - low) * np.random.random(shape) + low x.real = (high - low) * np.random.random(shape) + low
x.imag = (high - low) * np.random.random(shape) + low x.imag = (high - low) * np.random.random(shape) + low
elif dtype in [np.dtype('int8'), np.dtype('int16'), np.dtype('int32'), elif dtype in [np.dtype('int8'), np.dtype('int16'), np.dtype('int32'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment