Skip to content

Incorrect state generated by NumpySeedSequence for uint64 #3

@nikolaspaci

Description

@nikolaspaci

Hello,
I think there is an issue in the method generate() of NumpySeedSequence.
The state calculated when the words's size is 64 bits it's not the same as numpy.
So we don't have same results for a same seed.
I think you have to change return (result_type)((uint64_t)state1 << 32 | state2); to return (result_type)(state1 | (uint64_t)state2 << 32) Thanks to this we have same randoms values like numpy.
Thanks for you project :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions