We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c019f2 commit c960238Copy full SHA for c960238
conda_package/mpas_tools/viz/mpas_to_xdmf/io.py
@@ -302,6 +302,9 @@ def _parse_indices(index_string, dim_size):
302
if ':' in index_string:
303
# Support slice notation like ':', '0:10', '0:10:2', etc.
304
parts = index_string.split(':')
305
+ # Validate that parts has at most 3 elements
306
+ if len(parts) > 3:
307
+ raise ValueError(f"Invalid index string '{index_string}': too many colons. Expected at most two colons.")
308
# Pad parts to length 3 with empty strings if needed
309
while len(parts) < 3:
310
parts.append('')
0 commit comments