Skip to content

Commit

Permalink
Add assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
keller-mark committed Nov 27, 2024
1 parent f794ce2 commit bbdd4f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/vitessce/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1461,6 +1461,8 @@ def _layout(obj, x_min, x_max, y_min, y_max):
obj.set_xywh(x_min, y_min, w, h)
else:
views = obj.views
# If the split parameter is provided, it must have the same length as the views.
assert obj.split is None or len(obj.split) == len(views)
split = obj.split or [1] * len(views) # Default to equal split if not provided
total = sum(split)

Expand Down

0 comments on commit bbdd4f2

Please sign in to comment.