Skip to main content

All Questions

Tagged with
0 votes
0 answers
56 views

Overflow in solve_bvp during "simple" differential equation system

I would like to solve the following system of differential equation: d(phi)/dz= Rcl*i d(i)/dz = i0*exp(phi*2.3/b) I tried to solve this using solve_bvp from scipy and it didn't work. To check if a ...
Ingmar's user avatar
  • 1
1 vote
1 answer
75 views

(34, 'Numerical result out of range') calculating Annual Percentage Rate with scipy

I am trying to solve Annual Percentage Rate in Python using scipy library and newton method. At some point Python reaches max Pythonic float range solving this equation: Here is example code with ...
Martin Reguly's user avatar
0 votes
1 answer
271 views

How to avoid overflow in calculation matrix determinant with large elements

I am going to calculate the determinant of a random 2D-matrix (G) in Python. The matrix is of size about 30 by 30, where each element is chosen randomly from a large prime field with characteristic P ...
John's user avatar
  • 49
0 votes
0 answers
1k views

Python double_scalar overflow in scipy.optimize

I'm trying to optimize the parameters for a series of functions to best match a set of data. When I execute the script, for some loops the function works normally and for some I get the following ...
Habtra's user avatar
  • 21
0 votes
2 answers
6k views

Python OverflowError: math range error being raised differently in different runs

My program seems to be crashing almost arbitrarily. My code includes these two lines: z[i, j] = -math.exp(oneminusbeta[j, i]) weights[i,j] = math.exp(beta[j,i] + oneminusbeta[j,i]) I've run my whole ...
user961627's user avatar
  • 12.8k