Skip to content
Discussion options

You must be logged in to vote

JIT compiled functions cannot produce arrays whose static attributes (shape and dtype) are dependent on traced quantities. So no, there is not any way within a JIT-compiled context to produce a histogram with a number of bins that depends upon data values if the data is traced.

One option to get around this is to compute the value-dependent statistic you're using outside of JIT (in this case data.max() - data.min()) and pass it to the function as a static quantity

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jejjohnson
Comment options

Answer selected by jejjohnson
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