ArrayInterface.jl
ArrayInterface.jl copied to clipboard
Handling wrapped arrays
Today I gave up on something...
function DiffEqBase.get_tmp(dc::DiffEqBase.DiffCache, u::LabelledArrays.LArray{T,N,D,Syms}) where {T,N,D,Syms}
x = reinterpret(T, dc.dual_du.__x)
LArray{T,N,D,Syms}(x)
end
we need a better way to handle things like reinterpret and reshape on array types that are actually just wrapping another array type.
I think in general we need better support for getting at wrapped parameters. For example, parent_type would be helpful for these sorts of methods because we don't know for sure that x will be of the type D.