Skip to content
GitLab
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
7c69cf19
Commit
7c69cf19
authored
Jan 11, 2018
by
Martin Reinecke
Browse files
more fixes
parent
2bc45272
Pipeline
#23628
passed with stage
in 4 minutes and 54 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
nifty/data_objects/random.py
View file @
7c69cf19
...
...
@@ -32,6 +32,9 @@ class Random(object):
@
staticmethod
def
normal
(
dtype
,
shape
,
mean
=
0.
,
std
=
1.
):
if
not
(
np
.
issubdtype
(
dtype
,
np
.
floating
)
or
np
.
issubdtype
(
dtype
,
np
.
complexfloating
)):
raise
TypeError
(
"dtype must be float or complex"
)
if
not
np
.
isscalar
(
mean
)
or
not
np
.
isscalar
(
std
):
raise
TypeError
(
"mean and std must be scalars"
)
if
np
.
issubdtype
(
type
(
std
),
np
.
complexfloating
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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