linopy icon indicating copy to clipboard operation
linopy copied to clipboard

transpose method for variables

Open robingirard opened this issue 2 years ago • 1 comments

Is it planned to have the transpose method (available for xarray) for variables ? Since it does not exist for now, how can I formulate an equation such as : Var[a,b,t]+Var[b,a,t] == 0 for all a,b ,t Thanks in advance

robingirard avatar Aug 10 '23 07:08 robingirard

hey @robingirard, whereas linopy does not explicitly allow for tranposing the variables, you could do something like,

x + x.loc[x.coords["b"], x.coords["a"]] == 0

Hope that helps!

FabianHofmann avatar Aug 15 '23 10:08 FabianHofmann