We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5778db1 commit ca77e62Copy full SHA for ca77e62
odml/validation.py
@@ -374,8 +374,14 @@ def property_values_check(prop):
374
return
375
376
for val in prop.values:
377
- try:
378
- dtypes.get(val, dtype)
379
- except ValueError:
380
- msg = "Property values not of consistent dtype!"
381
- yield ValidationError(prop, msg, LABEL_WARNING)
+ if dtype.endswith("-tuple"):
+ tuple_len = int(dtype[:-6])
+ if len(val) != tuple_len:
+ msg = "Tuple of length %s not consistent with dtype %s!" % (len(val), dtype)
+ yield ValidationError(prop, msg, LABEL_WARNING)
382
+ else:
383
+ try:
384
+ dtypes.get(val, dtype)
385
+ except ValueError:
386
+ msg = "Property values not of consistent dtype!"
387
0 commit comments