Change key type from prng_key to Array#2178
Conversation
Co-authored-by: Copilot <copilot@github.com>
juanitorduz
left a comment
There was a problem hiding this comment.
LGTM :)
(can you please ensure the lint is happy :) )
Qazalbash
left a comment
There was a problem hiding this comment.
LGTM!
Can we use an alias like PRNGKeyArray to distinguish between regular arrays and keys?
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
I'm not sure if PRNGKey is an alias though. It seems |
I am not saying the alisa exists. My point was to use, PRNGKeyArray: TypeAlias = Arrayand use |
|
Gotcha. I'm fine with either, slightly prefer using Array to be aligned with jax and shorter - the variable name already convey the "key" message. |
|
Let's see this in the future :) |
A key has type Array while
key.dtypeis a subclass ofjax.dtypes.prng_key.