Skip to content

Commit 0f931b3

Browse files
bashtagemattip
authored andcommitted
BUG: Fix type in zipf
Correct type form long to int64
1 parent f11921d commit 0f931b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpy/random/src/distributions/distributions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ int64_t random_zipf(brng_t *brng_state, double a) {
10701070

10711071
T = pow(1.0 + 1.0 / X, am1);
10721072
if (V * X * (T - 1.0) / (b - 1.0) <= T / b) {
1073-
return (long)X;
1073+
return (int64_t)X;
10741074
}
10751075
}
10761076
}

0 commit comments

Comments
 (0)