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

  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. Your …

  3. NumPy: function for simultaneous max () and min ()

    176 numpy.amax () will find the max value in an array, and numpy.amin () does the same for the min value. If I want to find both max and min, I have to call both functions, which requires passing over …

  4. python - How to use numpy functions in numba - Stack Overflow

    Feb 12, 2021 · How to use numpy functions in numba Asked 4 years, 10 months ago Modified 4 years, 9 months ago Viewed 5k times

  5. Function application over numpy's matrix row/column

    Sep 1, 2016 · Almost all numpy functions operate on whole arrays, and/or can be told to operate on a particular axis (row or column). As long as you can define your function in terms of numpy functions …

  6. python - How to wrap NumPy functions in Numba-jitted code with ...

    Mar 17, 2025 · Numba reimplements many NumPy functions in pure Python and uses LLVM to compile them, resulting in generally efficient performance. However, some Numba implementations show …

  7. Are NumPy's math functions faster than Python's? - Stack Overflow

    Sep 6, 2010 · 25 You should use numpy function to deal with numpy's types and use regular python function to deal with regular python types. Worst performance usually occurs when mixing python …

  8. python - numpy.sin function in degrees? - Stack Overflow

    I'm working on a problem that has to do with calculating angles of refraction and what not. However, it seems that I'm unable to use the numpy.sin() function in degrees. I have tried to use numpy.d...

  9. How do I read CSV data into a record array in NumPy?

    Aug 19, 2010 · This gives a pandas DataFrame which provides many useful data manipulation functions which are not directly available with numpy record arrays. DataFrame is a 2-dimensional labeled …

  10. numpy - Graph a custom function in python - Stack Overflow

    Jan 28, 2018 · In case of more complex functions, look out for the numpy equivalents of the functions you intend to use. Most of the time the names are the same as in the math module, e.g. math.sin …