Using chex.assert_shape(x, ...) raises:
AssertionError: expected shapes should be a list or tuple of ints, got Ellipsis
However, Ellipsis works when wrapped in a tuple:
chex.assert_shape(x, (...,))
This makes it unclear whether ... is unsupported or just incorrectly formatted.
Suggested improvement:
Clarify the error message to indicate a shape specification must be a sequence and suggest using (...,).
Example improved message:
Expected a shape specification tuple, e.g. (...,) instead of bare Ellipsis (...)
Why this helps:
Users commonly interpret ... as a valid wildcard shape and the current message implies a type mistake rather than guiding correct usage.