About 50 results
Open links in new tab
  1. python - What does numpy.gradient do? - Stack Overflow

    Jul 8, 2014 · So I know what the gradient of a (mathematical) function is, so I feel like I should know what numpy.gradient does. But I don't. The documentation is not really helpful either: …

  2. python - How to plot grad (f (x,y))? - Stack Overflow

    Oct 11, 2015 · I want to calculate and plot a gradient of any scalar function of two variables. If you really want a concrete example, lets say f=x^2+y^2 where x goes from -10 to 10 and same for …

  3. python - How to correctly compute the gradient of a curve using …

    May 14, 2022 · I have a curve which is composed of 1200 values and i just want to compute its derivative so i use numpy gradient function. Here is the code i'm using: data = np.genfromtxt …

  4. python - Calculating gradient with NumPy - Stack Overflow

    Apr 18, 2013 · I really can not understand what numpy.gradient function does and how to use it for computation of multivariable function gradient. For example, I have such a function: def …

  5. Python: Calculate the Gradient of a 3D grid - Stack Overflow

    Oct 30, 2012 · 4 The Numpy documentation indicates that gradient works for any dimensions: numpy.gradient(f, *varargs) Return the gradient of an N-dimensional array. The gradient is …

  6. gradient descent using python and numpy - Stack Overflow

    Jul 22, 2013 · For the full maths explanation, and code including the creation of the matrices, see this post on how to implement gradient descent in Python. Edit: For illustration, the above code …

  7. numpy - Python - calculating a gradient - Stack Overflow

    Oct 23, 2017 · from numpy import gradient g = gradient(f) Then I get that gradient, but If I want to let the gradient to be equal to zero, how can I find the extreme points? Normally I am not a …

  8. python - Second order gradient in numpy - Stack Overflow

    The numpy.gradient function requires that the data be evenly spaced (although allows for different distances in each direction if multi-dimensional). If your data does not adhere to this, than …

  9. numpy - Gradient calculation with python - Stack Overflow

    Jul 28, 2013 · I would like to know how does numpy.gradient work. I used gradient to try to calculate group velocity (group velocity of a wave packet is the derivative of frequencies …

  10. python - How to plot a gradient color line? - Stack Overflow

    Simple lines in matplotlib, i.e. Line2d-objects, only support one color at once. If you want to have a color gradient, you will need to work with LineCollections.