How to perform a linear combination between 2 numpy arrays that approximates a 3rd array?

123 Views Asked by At

On paper it seems quite simple so forgive me if I'm missing something obvious.

I've got 2 input arrays X1 and X2 of the same shape, and a target array Y also of the same shape. I'd like to combine X1 and X2 in some way to produce an approximation of Y. The combination should be element-wise, eg X1[0][0] combines with X2[0][0] and so on. I'd appreciate any ideas on how to do this in python, and if you think there are good non-linear methods that would also be really helpful, thanks.

0

There are 0 best solutions below