Skip to content

Customize Hamiltonian Rule #755

Answered by PhilipVinc
thorben-frank asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for sharing it here!
Jax stack traces are terrible, and coupled with the callback into numba they definitely are gross....

TLDR: the error is in your random_state function. Below you can find my reasoning to identify the issue in case this helps in the future.

You can find an hint on the problem by working it backwards: the numba Jit compiler (which is called by the @njit4jax decorator) is complaining that it cannot compile log_prob_corr -= np.log(sections) because he cannot find an implementation for isub (inplace-subtraction, or -=) where the first argument is a vector of integers and the latter is a float vector.

So we know that log_prob_corr is a vector of integers, for some re…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@thorben-frank
Comment options

@PhilipVinc
Comment options

@thorben-frank
Comment options

Answer selected by PhilipVinc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #754 on June 11, 2021 15:17.