Skip to content

Commit e1064fc

Browse files
author
Matt Sokoloff
committed
dtype last index
1 parent f6f8f08 commit e1064fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

labelbox/data/annotation_types/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ def validate(cls, val, field: ModelField):
2525
raise TypeError(f"Expected numpy array. Found {type(val)}")
2626

2727
if sys.version_info.minor > 6:
28-
actual_dtype = field.sub_fields[1].type_.__args__[0]
28+
actual_dtype = field.sub_fields[-1].type_.__args__[0]
2929
else:
30-
actual_dtype = field.sub_fields[1].type_.__values__[0]
30+
actual_dtype = field.sub_fields[-1].type_.__values__[0]
3131

3232
if val.dtype != actual_dtype:
3333
raise TypeError(

0 commit comments

Comments
 (0)