-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
if UnlabeledExist:
if len(Sizes) > 1:
SizeRank = np.append(1, rankdata(-Sizes[1:len(Sizes)], method="ordinal")+1)
else:
SizeRank = 1
OrdNumLabs = SizeRank[NumLabs - 1]
else:
SizeRank = rankdata(-Sizes[np.arange(len(Sizes))], method="ordinal")
OrdNumLabs = SizeRank[NumLabs - 2]
In this code you are setting SizeRank to an array or an integer type based on the condition. The next statement refers to SizeRank with a subscript. We are falling into the path where SizeRank is set to 1 and are receiving a you cannot subscript an integer error. Types for a variable should be consistent. How shoud SizeRank be initialized if len(Sizes) is not greater than 1.
Metadata
Metadata
Assignees
Labels
No labels