Tag Info

2

From what I can tell this is an initial value ODE problem, so you should be able to use solve_ivp. This handles vector equations just fine. I'm not sure exactly how stiff your problem is, so using the defaults for most of the settings should be fine, and you can adjust these if you find the numerical solution isn't satisfactory. There is one slightly ...

2

Pandas does not provide a three-dimensional data structure at this time, at some time I do enjoy this structure, but the option (as of today) is obsolete and has been removed. However, it is possible to express this type of data using the long format (also known as EAV) with three key columns (or index levels). Bearing this in mind; Jan Šimbera from the ...

2

Curve fitting can be very sensitive to your initial guess for each parameter. Because you don't specify a guess in your code, all of these parameters start with a value of 1. Comparing with the converged results for the t fitting, while t is actually pretty close to 1, the other parameters are much further away. Its mostly just luck that the t value didn't ...

1

You are only moving in one direction for each axis. coin_x = random.randint(1,2) # Move on x axis if coin_x == HEAD: b[step,0]+=1 elif coin_x == TAIL: b[step,0]-=1 # Move on y axis coin_y = random.randint(1,2) if coin_y == HEAD: b[step,1]+=1 elif coin_y == TAIL: b[step,1]-=1 `

1

MPI is designed so that the same executable is started on a number of machines, none of which may be the one on which the mpirun program is called. Furthermore, MPI jobs are typically put into a queue, and the actual job may run hours or days later. As a consequence, MPI jobs are not meant to be used in an interactive mode, but all input should be provided ...

1

Input from the console may work on process zero, if that runs locally, but will certainly not work on other ranks. However, I wouldn't even do interactive input on process zero. #!/bin/bash if [ $PMI_RANK -eq 0 ] ; then ( echo 5 ; echo 1 ; echo foo ) |$* else exec $* fi Put that in a script and start that with mpirun: mpirun myscript.sh myprogram ... 1 Ok, so first, you have a problem: when$s=0$both$x(0) = 0$and$\sin\Phi(0) = \sin(0) = 0$. To figure out how to deal with this, try to extend the function $$\frac{\sin\Phi(s)}{x(s)}$$ continuously for$s = 0\$. That means calculate the limit $$L = \lim_{s \to 0} \, \frac{\sin\Phi(s)}{x(s)}$$ The limit exists, because roughly speaking, the numerator is ...

Only top voted, non community-wiki answers of a minimum length are eligible