In NumPy's current implementation, the MT19937 generator takes an entropy input (int or sequence of int), passes it to a hash function implemented by SeedSequence, and uses the returned sequence of numbers as initial state values, except the first value. According to the description
The input seed is processed by SeedSequence to fill the whole state. The first element is reset such that only its most significant bit is set.
But it seems that the first state uint32
value is fixed: 2147483648.
my_pr_stream = np.random.Generator(np.random.MT19937(0))
print(my_pr_stream.bit_generator.state["state"]["key"][:3])
# output is [2147483648 3677149159 745650761]
my_seedsq = np.random.SeedSequence(0)
print(my_seedsq.generate_state(3))
# output is [2968811710 3677149159 745650761]
Does it always have that value? Do we gain something with it? If it is not that important what is in the first state, what were the reasons dropping the original idea of state initialization, where one can define the 1st state value with the seed value, and the rest are determined by an algorithm, as Wikipedia describes it?
Why I posted this question here and not on Numpy's github: NumPy directs to StackOverflow with questions, help and support. Their github is for bug reports and feature requests in general.