Save the date! Google I/O returns May 18-20 Register now


Samples the given nest of specs.

structure An ArraySpec, or a nested dict, list or tuple of ArraySpecs.
rng A numpy RandomState to use for the sampling.
outer_dims An optional list/tuple specifying outer dimensions to add to the spec shape before sampling.

A nest of sampled values following the ArraySpec definition.