Here is a summary of some of the issues encounted with generic array types:
- Krylov.jl solvers want to work with vectors and not arrays, so we reshape everything first
- DifferentiationInterface.jl v0.7 imposes that preparation types equal execution types (unless we relax the "strict" option)
- LinearOperators.jl wants
V(undef, n) to be defined for any vector type V, which errors e.g. for V = ComponentVector so in general it is easier to set V = Vector
- Pre-allocating a space with the correct vector type and doing
copyto!(::CustomType, ::Vector) before the pullback doesn't work when CustomType is not writable (e.g. reshape of UpperTriangular)
Related:
Here is a summary of some of the issues encounted with generic array types:
V(undef, n)to be defined for any vector typeV, which errors e.g. forV = ComponentVectorso in general it is easier to setV = Vectorcopyto!(::CustomType, ::Vector)before the pullback doesn't work whenCustomTypeis not writable (e.g.reshapeofUpperTriangular)Related: