I'm not sure that this solution is better, especially since it dodges a chance to practice with einops, but it does feel more elegant. If you agree that the einops solution should be kept, I can revert the code changes and reword the hint to just mention cartesian_prod as another option
p.s.
I know, I know I'm super behind -- I spent way more time than I should have trying (albeit successfully) to get pytorch / numpy working on my workstation after an unsuccessful experiment with nix.
I'm not sure that this solution is better, especially since it dodges a chance to practice with
einops
, but it does feel more elegant. If you agree that the einops solution should be kept, I can revert the code changes and reword the hint to just mentioncartesian_prod
as another optionp.s.
I know, I know I'm super behind -- I spent way more time than I should have trying (albeit successfully) to get pytorch / numpy working on my workstation after an unsuccessful experiment with nix.