Skip to content

Error when using AD on eigen #219

@lijas

Description

@lijas

This has worked before, but seems to be broken now.
Probably related to JuliaDiff/ForwardDiff.jl#703 , but I don't understand how to fix it.

# add Tensors 
using Tensors    
function myfunk(e)
      p, n = Tensors.eigen(e)
      return otimes(n[:,1])
end;
e = rand(SymmetricTensor{2,3});
Tensors.gradient(myfunk, e)

Gives this error:

ERROR: setindex!(::StaticArraysCore.SMatrix{3, 3, Float64, 9}, value, ::Int) is not defined.
 Hint: Use `MArray` or `SizedArray` to create a mutable static array

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