Difference between frompyfunc and vectorize in numpy

后端 未结 3 1588
夕颜
夕颜 2020-12-14 07:01

What is the difference between vectorize and frompyfunc in numpy?

Both seem very similar. What is a typical use case for each of them?

Edit:

3条回答
  •  盖世英雄少女心
    2020-12-14 07:18

    Although both methods provide you a way to build your own ufunc, numpy.frompyfunc method always returns a python object, while you could specify a return type when using numpy.vectorize method

提交回复
热议问题