🌐 AI搜索 & 代理 主页
Skip to content

Commit 73545ea

Browse files
committed
remove check for Y==0
1 parent ad4344c commit 73545ea

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

numpy/random/src/distributions/distributions.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -851,9 +851,6 @@ double random_wald(bitgen_t *bitgen_state, double mean, double scale) {
851851
double d;
852852

853853
Y = random_standard_normal(bitgen_state);
854-
if (Y == 0) {
855-
return mean;
856-
}
857854
Y = mean * Y * Y;
858855
d = 1 + sqrt(1 + 4 * scale / Y);
859856
X = mean * (1 - 2 / d);

0 commit comments

Comments
 (0)