A bug was introduced in Cython 0.18 that caused code like this to fail
cdef void foo(double& out):
out = 123
with an "Assignment to reference" error. See https://groups.google.com/d/msg/cython-users/j58Sp3QMrD4/y9vJy9YBi_kJ The bug was fixed and code like that worked through Cython 0.25.2. I just tried Cython 0.26.1 and the bug has reappeared.
As before, the workaround is to upgrade the reference parameter to a full pointer then dereference it:
cdef void foo(double& out):
(&out)[0] = 123
A bug was introduced in Cython 0.18 that caused code like this to fail
with an "Assignment to reference" error. See https://groups.google.com/d/msg/cython-users/j58Sp3QMrD4/y9vJy9YBi_kJ The bug was fixed and code like that worked through Cython 0.25.2. I just tried Cython 0.26.1 and the bug has reappeared.
As before, the workaround is to upgrade the reference parameter to a full pointer then dereference it: