Skip to content

module numpy.random.seed

Source: stdlib/numpy/random/seed.codon


DEFAULT_POOL_SIZE = 4


INIT_A = u32(0x43b0d7e5)


MULT_A = u32(0x931e8875)


INIT_B = u32(0x8b51f9dd)


MULT_B = u32(0x58f38ded)


MIX_MULT_L = u32(0xca01f9dd)


MIX_MULT_R = u32(0x4973f715)


XSHIFT = u32(((4 * 8) // 2))


MASK32 = u32(0xFFFFFFFF)


hashmix(value: u32, hash_const: u32)


mix(x: u32, y: u32)


random_seed_time_pid()


SeedSequence

Fields

entropy: ndarray[u32, ?]

pool_size: int

n_children_spawned: int

pool: ndarray[u32, ?]

Properties

spawn_key @property Method is a class property

Magic methods

__init__(self, entropy = None, spawn_key: Optional[List[int]] = None, pool_size: int = DEFAULT_POOL_SIZE, n_children_spawned: int = 0)

Methods

generate_state(self, n_words: int, dtype: type = u32)

spawn(self, n_children: int)