Skip to content

Commit bbdd4f2

Browse files
committed
Add assertion
1 parent f794ce2 commit bbdd4f2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/vitessce/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,6 +1461,8 @@ def _layout(obj, x_min, x_max, y_min, y_max):
14611461
obj.set_xywh(x_min, y_min, w, h)
14621462
else:
14631463
views = obj.views
1464+
# If the split parameter is provided, it must have the same length as the views.
1465+
assert obj.split is None or len(obj.split) == len(views)
14641466
split = obj.split or [1] * len(views) # Default to equal split if not provided
14651467
total = sum(split)
14661468

0 commit comments

Comments
 (0)