Hi, I am trying to solve the discrete Riccati equation using pytorch tensors. I have been attempting to use the control package
import control
import torch

n=2
d=1

Q = torch.eye(n)
R = torch.eye(d)

A = torch.rand(n,n)
B = torch.rand(n,d)

(P,L,K) = control.dare(A_opt, B_opt, Q, R)

However, when I run this I get the following error,
Screen Shot 2020-08-17 at 7.21.44 PM1124×334 53.9 KB
The control package generally works with numpy arrays. Does anyone know how to solve the Riccati equation using pytorch tensors?