change vocabulary type from list to numpy.array