Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in README.md #137

Merged
merged 2 commits into from
Feb 21, 2024
Merged

Fix typo in README.md #137

merged 2 commits into from
Feb 21, 2024

Conversation

LilithHafner
Copy link
Member

I tested this (concatenation of code blocks in readme after this PR) locally and it works:

from diffeqpy import de

def f(u,p,t):
    x, y, z = u
    sigma, rho, beta = p
    return [sigma * (y - x), x * (rho - z) - y, x * y - beta * z]

u0 = [1.0,0.0,0.0]
tspan = (0., 100.)
p = [10.0,28.0,8/3]
prob = de.ODEProblem(f, u0, tspan, p)
fast_prob = de.jit32(prob)
sol = de.solve(fast_prob,saveat=0.01)

import random
def prob_func(prob,i,rep):
  return de.remake(prob,u0=[random.uniform(0, 1)*u0[i] for i in range(0,3)],
            p=[random.uniform(0, 1)*p[i] for i in range(0,3)])

ensembleprob = de.EnsembleProblem(fast_prob, prob_func = prob_func, safetycopy=False)
sol = de.solve(ensembleprob,de.Tsit5(),de.EnsembleSerial(),trajectories=100,saveat=0.01)

sol.u[0]
sol.u[1]

Fixes the issue in the OP of #123 using the approach recommended by @jodemaey. Does not address @jodemaey's followup concerns about GPU usage.

@ChrisRackauckas ChrisRackauckas merged commit efe59c9 into SciML:master Feb 21, 2024
2 checks passed
@LilithHafner LilithHafner deleted the patch-3 branch February 21, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants