13 Commits

Author SHA1 Message Date
Jake VanderPlas
a52d18781e Add experimental static key reuse checking 2023-12-11 12:03:48 -08:00
David Majnemer
ad14478dd9 Further enhance the seed
This choice passes more tests for more targets.

PiperOrigin-RevId: 588395200
2023-12-06 05:47:20 -08:00
David Majnemer
f29ec4ed45 Change seed for a test
We got unlucky and hit a seed which happens to fail the KS test.

PiperOrigin-RevId: 587885112
2023-12-04 17:06:17 -08:00
jiayaobo
ae2387dc27 add random.binomial
update

update

modify
2023-11-19 14:51:10 +08:00
Jake VanderPlas
5f7335fb55 Deprecate jax.random.shuffle
This has been long deprecated, but this PR uses the standard deprecation
framework to make it easier to finalize.
2023-11-06 12:21:56 -08:00
Jake VanderPlas
96d9f89415 [random] better errors for unsupported operations on prng keys 2023-11-03 19:23:18 -07:00
Jake VanderPlas
6da4750c3b [random] remove internal uses of deprecated prng.seed_with_impl() 2023-10-17 13:18:08 -07:00
Sergei Lebedev
cbcaac2756 MAINT Migrate remaining internal/test modules to use state objects
The motivation here is to gradually replace all dynamic lookups on `jax.config`
with statically-typed state objects, which are more type checker/IDE friendly.

This is a follow up to #18008.
2023-10-12 17:32:15 +01:00
Sergei Lebedev
2f70ae700a Migrate another subset of internal modules to use state objects
The motivation here is to gradually replace all dynamic lookups on `jax.config`
with statically-typed state objects, which are more type checker/IDE friendly.

This is a follow up to #18008.

PiperOrigin-RevId: 572587137
2023-10-11 08:46:06 -07:00
Blake Hechtman
a10854786b [JAX] randint goes from [min, max) so [min - N, max + M] actually maps to [min,
max]

PiperOrigin-RevId: 572034040
2023-10-09 14:05:39 -07:00
Jake VanderPlas
b407620d1d random_test: fix deprecation warnings for key tests
Some versions of numpy on some platforms raise warnings when custom PRNG keys
are passed to np.assert_array_equal. Address this by creating a specific function
for comparing key values.
2023-10-06 13:21:23 -07:00
Jake VanderPlas
3d503e01dc random_test: remove unnecessary test utilities 2023-10-05 15:33:14 -07:00
jax authors
8f911e1512 random_test: Split into two so that each target is small enough to fit within a medium timeout.
PiperOrigin-RevId: 571146766
2023-10-05 15:28:51 -07:00