79482918

Date: 2025-03-04 07:28:50
Score: 1.5
Natty:
Report link

I recently came across this nice one-liner alternative:

import itertools

key_seq = map(jax.random.key, itertools.count())
key = next(key_seq)

which uses the infinite iterator count.

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Hylke