Open munechika-koyo opened 1 year ago
when checking the docs (https://cython.readthedocs.io/en/latest/src/userguide/special_methods.html),
I noticed that parameters of __mul__
method had been changed. (__mul__(x, y)
-> __mul__(self, other)
)
This seems to cause the issue.
And we should implement __rmul__()
reverse method.
Hi,
Yes, this applies to all binary arithmetic methods. As pointed out by @jacklovell in #373, there is a directive c_api_binop_methods=True
that allows the old implementation to continue working. I was going to fix Raysect incompatibility with Cython 3.0, but haven't found the time yet. I will try to look in the near future, because this also affects Cherab.
Thank you for your prompt reply. I could not noticed that issue. I am also trying to fix all binary arithmetic methods at least and going to push the PR, so please consider it if you are welcome.
I am also trying to fix all binary arithmetic methods at least and going to push the PR, so please consider it if you are welcome.
Thank you very much! The fix you proposed is fine with me. Let's wait for a response from @CnlPepper.
Hello,
I found that runtime error about vector multiplication calculation like:
This error cannot be seen if I compile
raysect
bycython < 3.0.0
. So, I suppose the issue is caused by cython 3.0 incompatibility.