21,875 questions
0
votes
1
answer
46
views
vscode go to definition for scipy doesn't work
How to make VSCode "go to definition" work for scipy?
It works for all other packages but this one.
I have this:
import scipy as sp
If I right-click on scipy or sp and choose "Go to ...
0
votes
0
answers
61
views
Clustering without all pairwise distances
I have a set of binarized images containing forms, each image follows one of N layouts. There are a few outliers which do not follow a layout and contain random text and images.
The distance between ...
1
vote
2
answers
75
views
Scipy.fsolve | Reconstruct the Jacobian from QR
I am trying to understand if its possible to reconstruct full jacobian or atleast one element of the jacobian from the infodict of scipy.fsolve
To make the request concrete, Lets say im trying to ...
1
vote
0
answers
30
views
PyInstaller build fails on Ubuntu 22.04: portError: libscipy_openblas-b75cc656.so (works on Ubuntu 24.04)
I’m building a Python 3.12.10 application with PyInstaller on Ubuntu 22.04. The same project and PyInstaller spec work when I build on Ubuntu 24.04, but on 22.04 the executable fails at runtime with ...
3
votes
3
answers
107
views
Numerically finding the minimum value of a variable where a function equals a value
I have a black box function baseball that determines the magnitude of the distance that a baseball travels when launched. It takes the initial speed, the angle of launch and the initial spin. Assuming ...
1
vote
1
answer
91
views
Scipy Hessian with Numpy cross product
I need to compute the Hessian of a function involving cross products in Python. As an experiment, I consider the simple function
def func(x):
return np.sum(np.cross(x[0:3], x[3:6]))
and compute the ...
4
votes
1
answer
64
views
Strange scipy.interpolate.RegularGridInterpolator timings
I am facing some strange timings with the RegularGridInterpolator from scipy.
Splitting the interpolation into 100 chunks and concatenating the final result seems to be faster for large arrays:
When ...
3
votes
1
answer
85
views
pyQt - Trying to draw B-Spline curve with mouse
I am trying to have a Pen Tool in my pyqt6 application. I am trying to make it how Inkscape's PenTool works. For now, I am trying to achieve the 'B-Spline' mode.
The issue is that my curve does not ...
1
vote
1
answer
71
views
How to differentiate a function that sums two matrices?
I'm trying to implement a custom negative binomial loss function for my LGBM model. Here is my code:
def negative_binomial_objective(y_true, y_pred):
p = 0.5
def loss(x, t):
loss = (
...
0
votes
1
answer
57
views
Understanging right_bases of peak_prominences
I have this code:
import matplotlib.pyplot as plt
from scipy.signal import find_peaks, peak_prominences
# I have my array x
peaks, _ = find_peaks(x)
prominences, left_bases, right_bases = ...
0
votes
0
answers
81
views
Standard deviations of fit parameters suspiciously small
I am attempting to perform a nonlinear curve fit to some experimental data obtained from an oscilloscope. The time signal is a sinusoidal voltage over time and I want to evaluate the phase of the ...
1
vote
1
answer
77
views
Why GenPareto from Scipy and Tensorflow-Probability show difference?
I'm trying to understand why the Generalized Pareto distribution shows different results for the same parameters. The results from SciPy make sense, while the results from TensorFlow Probability do ...
2
votes
0
answers
89
views
scipy.odr.ODR fails when y_err (sy) is provided - "Problem is not full rank at solution"
I'm potentially interested in performing ODR for some laboratory data, so I have started to play around with scipy.odr using fake data, just for the sake of learning. In this fake data example, ...
3
votes
1
answer
109
views
add a condition on time in scipy odeint
I am having some troubles finding a simple solution to what seems to be a simple problem.
I want to compute the integration a simple function. And I want to modify this function if it reaches a ...
2
votes
1
answer
117
views
Mixture Model of genextreme in Scipy
I'm trying to develop a mixture of genextreme distributions in Scipy using the following code.
from scipy.stats import genextreme
from scipy.stats import Mixture
eva_1 = {'c': -0.48, 'loc': 38.82, '...