Closed jnrbsn closed 3 years ago
You are correct, it should not be.
Fixed in a commit.
It looks like you published a new version to PyPI (1.3.0), but the only available downloads are for Windows. So it won't let me install it on macOS or Linux. Previous versions had a source distribution available that would get used on macOS and Linux.
Right. Should be good now. Please check.
(It used to be automatic but travis is botching it.)
I can install it now, and I can confirm it's no longer giving me negative integers. Thanks.
Thanks for the feedback. Hopefully this will prove useful.
The C function
pcg32_random()
returns an unsigneduint32_t
, but thepcg32()
function exposed to Python callsPy_BuildValue()
with"i"
, which causes it to return a signedint
(docs). Is this a bug or was it intentional? I don't see this explicitly mentioned anywhere, but I assumed it would give me unsigned 32-bit integers, and I was surprised to see it giving me negative numbers.