Thank you.
This is indeed a lot of code for me to go through, especially given that I am not sure if there are other “not executable Python” issues hiding in the code.
From a quick look the one place where I see an in-place update is the line
x0[:,:self.trans_dim] += x1

You can check if this is where the error is, by commenting it out and checking if the error goes away.