Skip to content

Fix Reshape of HCATs #9

@nantonel

Description

@nantonel

Currently Reshape of HCATs and operators such as BlockArrays/ArrayPartitions is broken.
Possible solution by adding the following function:

function AbstractOperators.permute(T::Reshape{N,L}, p::AbstractVector{Int}) where {N,L}
    A = AbstractOperators.permute(T.A,p)
    return Reshape(A,T.dim_out) 
end
AbstractOperators.Jacobian(R::Reshape{N,L},x) where {N,L} = Reshape(Jacobian(R.A,x),R.dim_out) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions