numpy 1.22.4 Pypi GitHub Homepage
Other Docs
NotesParameters
SFC64(seed=None)

Notes

SFC64 is a 256-bit implementation of Chris Doty-Humphrey's Small Fast Chaotic PRNG (). SFC64 has a few different cycles that one might be on, depending on the seed; the expected period will be about $2^{255}$ (). SFC64 incorporates a 64-bit counter which means that the absolute minimum cycle length is $2^{64}$ and that distinct seeds will not run into each other for at least $2^{64}$ iterations.

SFC64 provides a capsule containing function pointers that produce doubles, and unsigned 32 and 64- bit integers. These are not directly consumable in Python and must be consumed by a Generator or similar object that supports low-level access.

State and Seeding

The SFC64 state vector consists of 4 unsigned 64-bit values. The last is a 64-bit counter that increments by 1 each iteration.

The input seed is processed by SeedSequence to generate the first 3 values, then the SFC64 algorithm is iterated a small number of times to mix.

Compatibility Guarantee

SFC64 makes a guarantee that a fixed seed will always produce the same random integer stream.

Parameters

seed : {None, int, array_like[ints], SeedSequence}, optional

A seed to initialize the BitGenerator . If None, then fresh, unpredictable entropy will be pulled from the OS. If an int or array_like[ints] is passed, then it will be passed to SeedSequence to derive the initial BitGenerator state. One may also pass in a SeedSequence instance.

BitGenerator for Chris Doty-Humphrey's Small Fast Chaotic PRNG.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /numpy/random/_sfc64.cpython-39-darwin.so#None
type: <class 'type'>
Commit: