# Check to see if the data has been padded with "none's"
# Fill doesn't work correctly otherwise
end=-1
fori,(x,y)inenumerate(reversed(values)):
ifxisnotNone:
end=-1-i
break
end=len(values)-1
whileend>0:
x,y=values[end]
ifself.missing_value_fill_truncation=="either":
ifxisnotNoneandyisnotNone:
break
elifself.missing_value_fill_truncation=="x":
ifxisnotNone:
break
elifself.missing_value_fill_truncation=="y":
ifyisnotNone:
break
else:
raiseValueError("Invalid value ({}) for config key 'missing_value_fill_truncation'; Use 'x', 'y' or 'either'".format(self.missing_value_fill_truncation))