random_split#

deeptrack.sources.base.random_split(source, lengths, generator=Generator(PCG64) at 0x7F606E8F04A0)#

Randomly split source into non-overlapping new sources of given lengths.

Parameters#

sourceSource

The source to split.

lengthslist of int or float

The lengths of the new sources. If the lengths are floats, they are interpreted as fractions of the source.

generatornumpy.random.Generator, optional

The random number generator to use.