Showing posts with the label python

[FIXED] sympy .subs() built-in function doesn't work

Issue I'm trying to implement the multivariate chain rule using python, when I try to substitut…

[FIXED] How do I compute derivative of a lambda expression using Sympy?

Issue How to compute a lambda expression's derivative ? For example: func = lambda x: x ** 3 …

[FIXED] How do you take a partial derivative symbolically in sympy while holding a parameter constant/having a fixed parameter?

Issue I am trying to get a partial derivative in the form seen here on page 2 in

[FIXED] Numpy or SciPy Derivative function for non-uniform spacing?

Issue I was wondering if numpy or scipy had a method in their libraries to find the numerical deriv…

[FIXED] Imposing derivatives in Scipy cubic spline

Issue I am using scipy cubic spline ("scipy.interpolate.CubicSpline") for 1-dimensional i…

[FIXED] Evaluate Derivative of Negative Log Likelihood Python

Issue I am trying to evaluate the derivative of the negative log likelihood functionin python. I am…

[FIXED] Solve System of Equations with Python Sympy

Issue I am trying to solve a system of two equations in Python using Sympy. This is bit trickier th…

[FIXED] finding the derivative of function using scipy.misc.derivative

Issue I'm having a problem that the function and its derivative should have the same value. The…

[FIXED] Solving Poisson equation FFT domain vs Finite difference

Issue I have two solutions of the current equation: src="https://i.stack.imgur.com/1tp41.png&…

[FIXED] PyTorch gradient differs from manually calculated gradient

Issue I'm trying to compute the gradient of 1/x without using Pytorch's autograd. I use the…

[FIXED] Derivatives in python

Issue I am trying to find the coefficients of a finite series, $f(x) = \sum_n a_nx^n$. To get the $…

[FIXED] Understanding numpy.gradient

Issue I have a time-series of voltage values recorded in mV every 0.02 ms , stored as a numpy arra…

[FIXED] Derivative of an array in python?

Issue Currently I have two numpy arrays: x and y of the same size. I would like to write a func…

[FIXED] Find the derivative of a piecewise function using the limit definition

Issue So I create a piecewise function like this: x= sp.symbols('x') f = sp.Piecewise( …

[FIXED] What is the Sobel operator?

Issue I tried 5 different implementations of the Sobel operator in Python, one of which I implement…

[FIXED] Why my derivative is not equal to theorical value?

Issue I make a derivative computation on sinusoidale signal. I make simple python program to test i…

[FIXED] nth derivative with sympy

Issue I'm a bit new to sympy I would like to compute nth derivative of an expression using sym…

[FIXED] Is there a way to calculate minima of a function

Issue I have a function similar to square error. It goes till n (n ~ 1000) f(s) = (d1 - sd'1)*…

[FIXED] Tensorflow: x - reduce_mean(x) has gradient 0

Issue I was observing gradients when I noticed that the gradient of subtracting one's axis'…

[FIXED] Softmax and its derivative along an axis

Issue I'm trying to implement a Softmax activation that can be applied to arrays of any dimensi…