tf_agents.specs.array_spec.assert_arrays_spec_nest

Stay organized with collections Save and categorize content based on your preferences.

Check that the arrays conform to the spec.

arrays A NumPy array, or a nested dict, list or tuple of arrays.
spec An ArraySpec, or a nested dict, list or tuple of ArraySpecs.

A TypeError or ValueError describing the mismatch.