Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions chex/_src/asserts.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,10 @@ def assert_shape(
match; if ``expected_shapes`` has wrong type; if shape of ``input`` does
not match ``expected_shapes``.
"""
if expected_shapes is Ellipsis:
raise AssertionError(
"Error in shape compatibility check: `...` must be wrapped in a tuple, "
"e.g. `(...,)` not `...`.")
if not isinstance(expected_shapes, (list, tuple)):
raise AssertionError(
"Error in shape compatibility check: expected shapes should be a list "
Expand Down