NumpyRNG#

class deeptrack.sources.rng.NumpyRNG(n_states, seed=None)#

Bases: Source, RandomState

Class that generates multiple numpy random number generators.

It is used for creating multiple rng’s with different seeds.

Parameters#

n_statesint

The number of random number generators to create.

seedint, optional

The seed used to initialize the first random generator. If not provided, a random seed will be generated automatically using np.random.randint().

Attributes#

rnglist of numpy.Random

A list of numpy.Random objects, each seeded with a unique value.

Methods#

_generate_states()list

Generates and returns a list of independent numpy.Random objects.

reset()None

Resets the list of random number generators with new seeds.

__getattribute__(__name)Any

Custom attribute access to allow lazy evaluation of random number generator methods.

_create_lazy_callback(__name)callable

Creates a lazy callback for accessing methods from the numpy.Random objects.

set_index(index)self

Sets the current index and resets the random number generators.

Methods Summary

reset()

set_index(index)

Methods Documentation

reset()#
set_index(index)#