Hacker News new | ask | show | jobs
by ninja3925 882 days ago
True.

Also, you are probably doing it wrong by turning a matrix to matrix multiplication into a for loop (over rows). The optimal solution results in better performance

sim = np.vstack(df.col) @ vec