rlouf / mcx

Express & compile probabilistic programs for performant inference on CPU & GPU. Powered by JAX.
https://rlouf.github.io/mcx
Apache License 2.0
325 stars 17 forks source link

Use single dispatch instead of `isinstance` in the parser #112

Open rlouf opened 1 year ago

rlouf commented 1 year ago

In case someone is reading this and would like to use part of the code, you should replace the succession of isinstance statements with single dispatch on AST nodes.