diff options
| author | Kevin Sheppard <kevin.k.sheppard@gmail.com> | 2021-02-17 11:05:42 +0000 |
|---|---|---|
| committer | Kevin Sheppard <kevin.k.sheppard@gmail.com> | 2021-02-18 16:39:36 +0000 |
| commit | e2467e463d7f0c7fe01ef33311d007f7182a0cf7 (patch) | |
| tree | b3d6be604934701d68c86729525a09134ab2c0ae /numpy/random | |
| parent | 0eb9f54e5e466c8d7a76ae116712b368d045c7e0 (diff) | |
| download | numpy-e2467e463d7f0c7fe01ef33311d007f7182a0cf7.tar.gz | |
MAINT: Correct code producing warnings
Cast to avoid warnings
Correct function
Diffstat (limited to 'numpy/random')
| -rw-r--r-- | numpy/random/src/distributions/distributions.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/random/src/distributions/distributions.c b/numpy/random/src/distributions/distributions.c index 93e0bdc5f..4494f860e 100644 --- a/numpy/random/src/distributions/distributions.c +++ b/numpy/random/src/distributions/distributions.c @@ -971,7 +971,7 @@ RAND_INT_TYPE random_zipf(bitgen_t *bitgen_state, double a) { * just reject this value. This function then models a Zipf * distribution truncated to sys.maxint. */ - if (X > RAND_INT_MAX || X < 1.0) { + if (X > (double)RAND_INT_MAX || X < 1.0) { continue; } |
