Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
4d1be300
Commit
4d1be300
authored
Sep 14, 2017
by
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
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty2go/random.py
View file @
4d1be300
...
...
@@ -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.
,
s
td
*
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.
,
s
cale
=
np
.
sqrt
(
0.5
),
size
=
shape
)
else
:
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
@
staticmethod
...
...
setup.py
View file @
4d1be300
...
...
@@ -32,8 +32,8 @@ setup(name="nifty2go",
dependency_links
=
[
'git+https://gitlab.mpcdf.mpg.de/ift/pyHealpix.git@setuptools_test#egg=pyHealpix-0.0.1'
],
license
=
"GPLv3"
,
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'
],
classifiers
=
[
"Development Status :: 4 - Beta"
,
"Topic :: Utilities"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment