ArrayInterface.jl icon indicating copy to clipboard operation
ArrayInterface.jl copied to clipboard

Handling wrapped arrays

Open ChrisRackauckas opened this issue 5 years ago • 1 comments

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.

ChrisRackauckas avatar Apr 08 '20 04:04 ChrisRackauckas

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.

Tokazama avatar Apr 15 '20 08:04 Tokazama