[python] TypeError: only length-1 arrays can be converted to Python scalars while plot showing