About 2,200,000 results
Open links in new tab
  1. Using Numpy Vectorize on Functions that Return Vectors

    Using Numpy Vectorize on Functions that Return Vectors Asked 15 years, 4 months ago Modified 2 years, 11 months ago Viewed 125k times

  2. python - Performance of Pandas apply vs np.vectorize to create …

    Oct 6, 2018 · np.vectorize, list comprehension + zip and map methods, i.e. the top 3, all have roughly the same performance. This is because they use tuple and bypass some Pandas …

  3. python - How to use np.vectorize? - Stack Overflow

    Feb 13, 2021 · Isn't the answer to How to use np.vectorize? usually "Don't. It just pretends to be a vectorized function but is just a loop with a different name"?

  4. How to vectorize with gcc? - Stack Overflow

    Apr 4, 2020 · The v4 series of the gcc compiler can automatically vectorize loops using the SIMD processor on some modern CPUs, such as the AMD Athlon or Intel Pentium/Core chips. How …

  5. simd - What is "vectorization"? - Stack Overflow

    Aug 11, 2021 · Many CPUs have "vector" or "SIMD" instruction sets which apply the same operation simultaneously to two, four, or more pieces of data. Modern x86 chips have the SSE …

  6. c++ - What does vectorization mean? - Stack Overflow

    Oct 4, 2009 · Is it a good idea to vectorize the code? What are good practices in terms of when to do it? What happens underneath?

  7. How do I vectorize a function with Numba, when the function …

    Jul 17, 2018 · I'd like to use Numba to vectorize a function that will evaluate each row of a matrix. This would essentially apply a Numpy ufunc to the matrix, as opposed to looping over the …

  8. How to vectorize an image using OpenCV? - Stack Overflow

    Nov 23, 2021 · Here is an example picture I'm trying to "vectorize": What I would like to do is (using OpenCV) separate the corncob from the green stock it's attached to, and separate each …

  9. How to vectorize a function which contains an if statement?

    Jul 9, 2014 · def f(x, y): np.where(y == 0, 0, x/y) which doesn't work for scalars. Is there a better way to write a function which contains an if statement? It should work with both scalars and …

  10. Is it possible to numpy.vectorize an instance method?

    Feb 26, 2018 · The decorator version @vectorize is harder to apply than the function version. Your method f takes two arguments, self and x. vectorize isn't smart enough to assign …