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
Sebastian Heimann
grond
Commits
3cf6a515
Commit
3cf6a515
authored
Jun 14, 2016
by
Sebastian Heimann
Browse files
fix problem with normal distributions with zero standard deviation
parent
5a541d39
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/core.py
View file @
3cf6a515
...
...
@@ -1253,8 +1253,12 @@ def solve(problem,
for
i
in
xrange
(
npar
):
ntry
=
0
while
True
:
v
=
num
.
random
.
normal
(
xb
[
i
],
math
.
sqrt
(
factor
)
*
sbx
[
i
])
if
sbx
[
i
]
>
0.
:
v
=
num
.
random
.
normal
(
xb
[
i
],
math
.
sqrt
(
factor
)
*
sbx
[
i
])
else
:
v
=
xb
[
i
]
if
xbounds
[
i
,
0
]
<=
v
and
v
<=
xbounds
[
i
,
1
]:
break
...
...
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