Commit 4d1be300 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

work around a limitation of numpy 1.11

parent d4babb8e
Pipeline #18205 passed with stage
in 5 minutes and 44 seconds
......@@ -35,11 +35,13 @@ class Random(object):
def normal(dtype, shape, mean=0., std=1.):
if issubclass(dtype, (complex, np.complexfloating)):
x = np.empty(shape, dtype=dtype)
x.real = np.random.normal(mean, std*np.sqrt(0.5), shape)
x.imag = np.random.normal(0., std*np.sqrt(0.5), shape)
x.real = np.random.normal(loc=0., scale=np.sqrt(0.5), size=shape)
x.imag = np.random.normal(loc=0., scale=np.sqrt(0.5), size=shape)
x = np.random.normal(mean, std, shape)
x = np.random.normal(loc=0., scale=1., size=shape)
x = x.astype(dtype, copy=False)
x *= std
x += mean
return x
......@@ -32,8 +32,8 @@ setup(name="nifty2go",
setup_requires=['future', 'pyHealpix>=0.0.1', 'numpy>=1.13', 'pyfftw>=0.10.4'],
install_requires=['future', 'pyHealpix>=0.0.1', 'numpy>=1.13', 'pyfftw>=0.10.4'],
setup_requires=['future', 'pyHealpix>=0.0.1', 'numpy', 'pyfftw>=0.10.4'],
install_requires=['future', 'pyHealpix>=0.0.1', 'numpy', 'pyfftw>=0.10.4'],
"Development Status :: 4 - Beta",
"Topic :: Utilities",
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment