About 5,810,000 results
Open links in new tab
  1. 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"?

  2. Using Numpy Vectorize on Functions that Return Vectors

    The purpose of np.vectorize is to transform functions which are not numpy-aware (e.g. take floats as input and return floats as output) into functions that can operate on (and return) numpy arrays.

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

    Sep 14, 2009 · 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 …

  4. 0-dimensional array problems with `numpy.vectorize`

    Feb 18, 2025 · 2 numpy.vectorize conveniently converts a scalar function to vectorized functions that can be applied directly to arrays. However, when inputting a single value into the …

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

    Oct 6, 2018 · I am using Pandas dataframes and want to create a new column as a function of existing columns. I have not seen a good discussion of the speed difference between …

  6. c++ - tree vectorization: gcc optimization flag - Stack Overflow

    Mar 10, 2016 · I have noticed that the gcc flag -ftree-vectorize is very useful for optimizing code. I am trying to understand better how it works, but the doc is fairly concise: Perform vectorization …

  7. Most efficient way to map function over numpy array

    Feb 5, 2016 · What is the most efficient way to map a function over a numpy array? I am currently doing: import numpy as np x = np.array ( [1, 2, 3, 4, 5]) # Obtain array of square ...

  8. numpy - Python: vectorise function over two multi-dimensional …

    Sep 9, 2019 · In python, it is simple to vectorise a function f(x) of a scalar x over a single array a1: just use f(a1). But suppose I have two (or in principle, multiple) arrays a1, a2 having the same …

  9. gcc - -ftree-vectorize option in GNU - Stack Overflow

    Nov 6, 2015 · With the GCC compiler, the -ftree-vectorize option turns on auto-vectorization, and this flag is automatically set when using -O3. To what level does it vectorize?

  10. Is `-ftree-loop-vectorize` not enabled by `-O2` in GCC v12?

    Dec 23, 2022 · SIMD, Vectorize. is enabled by -o2, loop unrolling makes the code much larger so it is a separate flag in -o2 and included in -o3. many times -o2 will out-perform -o3.