RecursiveArrayTools.jl
RecursiveArrayTools.jl copied to clipboard
should use broadcast for vector space calculations?
https://github.com/SciML/RecursiveArrayTools.jl/blob/569a07e9f0ecaacef167ee52e8101122a25c9b4a/test/partitions_test.jl#L78-L82
What's the use case for the vector space interface? using broadcast, rather than overloading +,- would be consistent with AbstractArray interface.
julia> 2 + rand(2)
ERROR: MethodError: no method matching +(::Int64, ::Vector{Float64})
For element-wise addition, use broadcasting with dot syntax: scalar .+ array
julia> 2 .+ rand(2)
2-element Vector{Float64}:
2.50859350057021
2.7682555961902384
It's just old pre-v1.0 stuff probably.