Class SeedlessSeedSequence
- Namespace
- NumSharp
- Assembly
- NumSharp.dll
A seed sequence for bit generators that need no seed state (NumPy's
numpy.random.bit_generator.SeedlessSeedSequence).
public sealed class SeedlessSeedSequence : ISpawnableSeedSequence, ISeedSequence
- Inheritance
-
SeedlessSeedSequence
- Implements
- Inherited Members
Remarks
It cannot produce words — seeding a bit generator from it fails in the constructor, as in NumPy — and it
"spawns" itself: spawn(n) is [self] * n.
Methods
generate_state(long, DType)
Always fails: a seedless sequence has no state to generate from.
public NDArray generate_state(long n_words, DType dtype = null)
Parameters
Returns
- NDArray
Never returns.
Exceptions
- NotImplementedError
Always (NumPy's
NotImplementedError('seedless SeedSequences cannot generate state'), type and text).
spawn(int)
Returns this same instance n_children times (NumPy's [self] * n_children).
public ISpawnableSeedSequence[] spawn(int n_children)
Parameters
n_childrenintThe number of "children" (0: none).
Returns
- ISpawnableSeedSequence[]
An array whose every element is this instance.
Exceptions
- ValueError
n_childrenis negative: NumPy 2.5'sn_children must be non-negative(NumPy 2.4 returned an empty list, Python's[self] * -1).