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
would have an impact on the directives used when compiling Cython code. This is not the case at all. Such a line is completely ignored.
To resolve this ticket, either make the directive not be ignored, or delete this line from matrix_window_modn_dense.pyx.
Note that the actual directories used are currently hard coded in devel/sage/sage/setup.py in this code:
# call cython, abort if it failed
cmd = "python `which cython` %s --old-style-globals --disable-function-redefinition --embed-positions --directive cdivision=True,autotestdict=False,fast_getattr=True -I%s -o %s %s"%(cplus, os.getcwd(), outfile, f)
r = run_command(cmd)
The default with PSAGE is cdivision=False. This is causing me headaches when porting code from psage to sage. (E.g., #12465). For #12465 I'll probably try to figure out how to rewrite my code to work with cdivision=True, or use explicit cython directives on a function-by-function level.
OK, now I feel stupid. So even though the command line explicitly has --directive cdivision=True,, when cython sees the file it does cdivision=False, as long as # cython: cdivision=False is in the file. So I'm basically just totally wrong. I'm closing this ticket as invalid. Sorry for the noise and confusion.
The file matrix_window_modn_dense.pyx starts with
which suggests that putting a line like
would have an impact on the directives used when compiling Cython code. This is not the case at all. Such a line is completely ignored.
To resolve this ticket, either make the directive not be ignored, or delete this line from matrix_window_modn_dense.pyx.
Note that the actual directories used are currently hard coded in devel/sage/sage/setup.py in this code:
The default with PSAGE is cdivision=False. This is causing me headaches when porting code from psage to sage. (E.g., #12465). For #12465 I'll probably try to figure out how to rewrite my code to work with cdivision=True, or use explicit cython directives on a function-by-function level.
Component: build
Issue created by migration from https://trac.sagemath.org/ticket/12468
The text was updated successfully, but these errors were encountered: