Can somebody explain me the following line of C-code and translate it into Python? I have no plan....
x[IX(0 ,i)] = b==1 ? –x[IX(1,i)] : x[IX(1,i)]
The array structure is not important (except that I am interested in a vectorized Numpy form too). I'm interested in understanding the C command. Simplified we can write
D = b==1 ? –A : A
What does this mean? What is the result of D at the end? What's the role of –A : A
? How can we write this in Python? How can we write this vectorized in Numpy? Thank you !