3 ms·
For the last thing, is this what you want? https://github.com/JuliaArrays/PaddedViews.jl https://github.com/JuliaArrays/PaddedViews.jl There may be other packa
by oivey 6y ago
For the last thing, is this what you want? https://github.com/JuliaArrays/PaddedViews.jl https://github.com/JuliaArrays/PaddedViews.jl
There may be other packages or
methods for doing the other things you want. I’d think that broadcasting over a NamedTuple would iterate over the key => value pairs, but I haven’t tried it.
- legerdemain 6y agoThanks for the good find!
- oivey 6y agoLooks like vectorizing over NamedTuples is explicitly disallowed. Probably you can still vectorize things over the keys and values separately, along with some helper functions, but it is a bit annoying. Looks like the reason was due to questions on whether iteration should be over values or pairs.
- StefanKarpinski 6y agoIndeed, that is precisely the decision that must be made. Neither one is obviously correct. And once a decision is made and goes into a release, it cannot be unmade — we all have to live with it forever.