Interface ISeedSequence
- Namespace
- NumSharp
- Assembly
- NumSharp.dll
The seed-sequence protocol a BitGenerator seeds itself from (NumPy's
numpy.random.bit_generator.ISeedSequence).
public interface ISeedSequence
Remarks
A bit generator calls generate_state(long, DType) once in its constructor with the number of words its
state needs. SeedSequence is the standard implementation; SeedlessSeedSequence
is the placeholder for engines that need no seed. Implementations return what NumPy's protocol returns: a 1-D
uint32 (the default) or uint64 NDArray of at least n_words words, which the bit generators
read in C order.
Methods
generate_state(long, DType)
Return the requested number of words for PRNG seeding (NumPy's generate_state(n_words, dtype=np.uint32)).
NDArray generate_state(long n_words, DType dtype = null)
Parameters
n_wordslongThe number of words (a Python int in NumPy, allocated as
np.zeros(n_words)).dtypeDTypeuint32(default) oruint64; a uint64 word costs two uint32 words.
Returns
- NDArray
A 1-D uint32 or uint64 NDArray of
n_wordswords.