We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please:
Control flow is not easy in BrainPy because it relies on JAX. I think maybe there is a more conveninet way to write control flows. Like,
import brainpy as bp import brainpy.math as bm def f(a) return bm.ifelse(a > 10., lambda x: 10., a > 5 and a <= 10, lambda x: x*2, lambda x: x+2, x)
Or,
def f(b) return bm.ifelse(conditions=[a > 10., a > 5 and a <= 10], functions=[lambda x: 10., lambda x: x*2, lambda x: x+2], operands=x, dyn_vars=...)
The text was updated successfully, but these errors were encountered:
#189
Sorry, something went wrong.
chaoming0625
ztqakita
No branches or pull requests
Please:
Control flow is not easy in BrainPy because it relies on JAX. I think maybe there is a more conveninet way to write control flows. Like,
Or,
The text was updated successfully, but these errors were encountered: