Re: [typhon] OEM: scipy.linalg.inv vs. numpy.linalg.inv

2017-08-23 Thread Lukas Kluft
Hi Gerrit, 1. If I understand you correctly, the results for the 2D case do not change. So I see no problem with the new implementation. 2. I don't think that there was a special reason to choose scipy.linalg.inv over numpy.linalg.inv. You are absolutely right, that the function(s) should be

Re: [typhon] OEM: scipy.linalg.inv vs. numpy.linalg.inv

2017-08-22 Thread Gerrit Holl
On 22 August 2017 at 12:59, Oliver Lemke wrote: > Hi Gerrit, > > Why is it necessary to replace .T with .swapaxes? Could you give an example > were the former fails but the latter works? K.T swaps indexes 0 and 1, but matmul broadcasts along indices -1 and -2, so

Re: [typhon] OEM: scipy.linalg.inv vs. numpy.linalg.inv

2017-08-22 Thread Oliver Lemke
Hi Gerrit, Why is it necessary to replace .T with .swapaxes? Could you give an example were the former fails but the latter works? cheers, /oliver > On 22 Aug 2017, at 13:37, Gerrit Holl wrote: > > Hi, > > I need to adapt typhon.oem.retrieval_gain_matrix to allow >

[typhon] OEM: scipy.linalg.inv vs. numpy.linalg.inv

2017-08-22 Thread Gerrit Holl
Hi, I need to adapt typhon.oem.retrieval_gain_matrix to allow broadcasting. That would require two changes: - replace every occurrence of .T by .swapaxes(-1, -2) - replace scipy.linalg.inv by numpy.linalg.inv, as the former does not broadcast but the latter does. The former is fully backward