Skip to content

Conversation

@marius311
Copy link
Owner

Eg:

using CMBLensing, LinearAlgebra

f = FlatMap(rand(10,10))
ft = FieldTuple(;f, AL=1., r=0, Aϕ=[1,2])

ft2 = ft .+ ft # broadcasting works
ft3 = Diagonal(ft2) * ft # diagonal operators
ft3'ft3 # inner prod
(;f, AL) = ft2 # unpacking components

gradient(ft -> norm(Diagonal(ft)*ft), ft)[1] # gradients work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants