BrainPy icon indicating copy to clipboard operation
BrainPy copied to clipboard

How to convert back from brainpy arrays to functional-style jax

Open llandsmeer opened this issue 10 months ago • 1 comments

BrainPy uses a mutable/OOP style interface and has converters from functional jax style to BrainPy arrays. I'm using a project with functional jax, and would like to use brainpy inside this project. Thus, I would like to use a brainpy model in a functional style again, ie extract the function

timestep: state, input -> state'

How do I do this?

llandsmeer avatar Jun 09 '25 10:06 llandsmeer

I think you should use brainstate. It supports the functionality of inside of the jit function.

chaoming0625 avatar Jun 09 '25 13:06 chaoming0625

This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 14 days if no further activity occurs. If this issue is still relevant, please comment to keep it open. Thank you for your contributions!

github-actions[bot] avatar Oct 07 '25 01:10 github-actions[bot]