perfplot

Why `vectorize` is outperformed by `frompyfunc`?

Why `vectorize` is outperformed by `frompyfunc`? Question: Numpy offers vectorize and frompyfunc with similar functionalies. As pointed out in this SO-post, vectorize wraps frompyfunc and handles the type of the returned array correctly, while frompyfunc returns an array of np.object. However, frompyfunc outperforms vectorize consistently by 10-20% for all sizes, which can also not be …

Total answers: 2