RandomSplit.jl

Author olivierverdier
Popularity
0 Stars
Updated Last
2 Months Ago
Started In
September 2023

RandomSplit

Build Status codecov

Emulates the behaviour of JAXs pseudorandom number generators keys.

This works roughly like this

using RandomSplit
key = PRNGKey(0)
k, k_ = splitkey(k)
rand(k, Int) # some random Int
rand(k, Int) # SAME integer

In other words, you must split the key explicitly in order to obtain random results.

This package is hardly tested, use at your own risk.

(Contributions welcome, though)