About 50 results
Open links in new tab
  1. python - Understanding NumPy's Convolve - Stack Overflow

    When calculating a simple moving average, numpy.convolve appears to do the job. Question: How is the calculation done when you use np.convolve(values, weights, 'valid')? When the docs mentioned

  2. python - Pythonのconvolve2dについて - スタック・オーバーフロー

    Pythonでconvolve2dを使う下記のプログラムをかきました。 #coding:utf-8 import numpy as np from scipy import signal a = np.array([ [1,2,3,4,5,6], [7,8 ...

  3. How can I calculate a rolling / moving average using Python + NumPy ...

    The scipy.convolve approach is also very fast, extensible, and syntactically and conceptually simple, but doesn't scale well for very large window values. The numpy.cumsum method is good if you need a …

  4. Correctly using the numpy's convolve with an image

    Apr 6, 2019 · 5 np.convolve function, unfortunately, only works for 1-D convolution. That's why you get an error; you need a function that allows you to perform 2-D convolution. However, even if it did …

  5. python - Convolve2d just by using Numpy - Stack Overflow

    I would like to convolve a gray-scale image. (convolve a 2d Array with a smaller 2d Array) Does anyone have an idea to refine my method? I know that SciPy supports convolve2d but I want to make a …

  6. Python - Convolution with a Gaussian - Stack Overflow

    Jun 13, 2024 · I need to convolve this curve with a parametrized Gaussian function centered at 3934.8A: The problem I see is that my curve is a discrete array and the Gaussian is a continuous function. …

  7. numpy - Multidimensional Convolution in python - Stack Overflow

    As already mentioned in the comments the function np.convolve supports only 1-dimensional convolution. One alternative I found is the scipy function scipy.signal.fftconvolve which works for N …

  8. 2d convolution using python and numpy - Stack Overflow

    I am trying to perform a 2d convolution in python using numpy I have a 2d array as follows with kernel H_r for the rows and H_c for the columns data = np.zeros((nr, nc), dtype=np.float32) #fill ...

  9. Convolve a 3D array with three kernels (x, y, z) in python

    Feb 18, 2020 · I have a 3D image and three kernels k1, k2, k3 in the x, y and z direction.

  10. numpy - Convolution along one axis only - Stack Overflow

    Mar 31, 2015 · 32 I have two 2-D arrays with the same first axis dimensions. In python, I would like to convolve the two matrices along the second axis only. I would like to get C below without computing …