Use list comprehensions instead of vectorize