You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.
Hello,
I am using the Penalty class in sag_fast.pyx and I need to propagate an exception which occurs inside the projection method.
Since the return value of the function is void, cython is not able to propagate this error to the layers above, as explained here. The solution they propose is to change the return value to int and add the except -1 in the declaration.
cdef int projection(self,
double* w,
int* indices,
double stepsize,
int n_nz) except -1:
At the moment I am not able to test this change. This is due the fact that I am working on a Windows environement, and as the setup.py compiles the .cpp cython-compiled files, that is something I am not able to do in my computer (even though it works in appveyor). The best way would be to remove the cpp files and force at the setup the compilation of the extension by cython, as you already proposed.
If you are ok with the type changement, I will send a pull request whenever I am able to use linux where the package compiles correctly
The text was updated successfully, but these errors were encountered:
Hi @casotto ! Thanks for the report. The solution sounds good. If you want you can make a pull request with the fix and I will re-generate the .cpp files.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
I am using the
Penalty
class in sag_fast.pyx and I need to propagate an exception which occurs inside theprojection
method.Since the return value of the function is
void
, cython is not able to propagate this error to the layers above, as explained here. The solution they propose is to change the return value toint
and add theexcept -1
in the declaration.I wonder if it would be ok to change
to
At the moment I am not able to test this change. This is due the fact that I am working on a Windows environement, and as the
setup.py
compiles the.cpp
cython-compiled files, that is something I am not able to do in my computer (even though it works in appveyor). The best way would be to remove the cpp files and force at the setup the compilation of the extension by cython, as you already proposed.If you are ok with the type changement, I will send a pull request whenever I am able to use linux where the package compiles correctly
The text was updated successfully, but these errors were encountered: