dedalus icon indicating copy to clipboard operation
dedalus copied to clipboard

np.real operator in equations does not take real part

Open lecoanet opened this issue 1 year ago • 2 comments

It seems like if you add an equation with an operator "np.real" the code runs without complaining, but it does not appear to take the real part. I will try to come up with a simple example to demonstrate this.

lecoanet avatar Jul 08 '24 18:07 lecoanet

np.real and np.imag are not ufuncs, so I think its treating dedalus fields as just random objects. It looks like we might be able to circumvent this behavior by defining .real and .imag properties that return the operators we want.

kburns avatar Jul 17 '24 16:07 kburns

Added real and imag properties for operands in #305.

kburns avatar Aug 28 '24 16:08 kburns

Closing at #305 has been merged.

kburns avatar Dec 13 '24 15:12 kburns