diff options
| author | Hood Chatham <roberthoodchatham@gmail.com> | 2022-01-26 18:59:47 -0800 |
|---|---|---|
| committer | Hood Chatham <roberthoodchatham@gmail.com> | 2022-01-26 19:05:06 -0800 |
| commit | 575e6b726adcd2c1bef5ca0185aa2b2178cea20e (patch) | |
| tree | 1b1f5aace0a99baca1a0e37d47fb92c78a1867bc /numpy | |
| parent | eee12b6fcf2b05bcdd7fc55da1a5df5d3bee9c28 (diff) | |
| download | numpy-575e6b726adcd2c1bef5ca0185aa2b2178cea20e.tar.gz | |
BUG: Fix the return type of random_float_fill
The `random_float_fill` function type is declared with return type `double` but
I think this is a typo. The actual implementation of `random_float_fill` is
`random_standard_uniform_fill_f` which has return type `void`:
void random_standard_uniform_fill_f(bitgen_t *bitgen_state, npy_intp cnt, float *out)
Also, `random_double_fill` is declared with return type `void`. This fixes the
return type of `random_float_fill` to match.
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/random/_common.pxd | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/random/_common.pxd b/numpy/random/_common.pxd index 9f2e8c3ca..3625634cd 100644 --- a/numpy/random/_common.pxd +++ b/numpy/random/_common.pxd @@ -45,7 +45,7 @@ ctypedef double (*random_double_1)(void *state, double a) nogil ctypedef double (*random_double_2)(void *state, double a, double b) nogil ctypedef double (*random_double_3)(void *state, double a, double b, double c) nogil -ctypedef double (*random_float_fill)(bitgen_t *state, np.npy_intp count, float* out) nogil +ctypedef void (*random_float_fill)(bitgen_t *state, np.npy_intp count, float* out) nogil ctypedef float (*random_float_0)(bitgen_t *state) nogil ctypedef float (*random_float_1)(bitgen_t *state, float a) nogil |
