I'm just finishing making RDF and CDF vectors use numpy under the hood. The last problem I'm having is trying to use the Cython buffer interface in sage/rings/polynomial/real_roots.pyx to access the underlying numpy array.
The patch is up at http://trac.sagemath.org/sage_trac/ticket/4206. It depends on sage 3.2 and the patch at #4570. The following steps produce the problem for me: 1. Apply the patch at #4570. 2. Apply the patch at #4206. 3. Go to sage/rings/polynomial/real_roots.pyx, and uncomment the lines that contain "numpy.ndarray". Each of these lines declares a cython numpy array. Preceding each of these lines is an assignment for the same variable; comment the old assignments out. For example, change lines 1267 and 1268 to look like: #dbv = db cdef numpy.ndarray[float, ndim=1] dbv = db._vector_numpy 4. sage -br Then I get the following during the compilation: $ sage -br ---------------------------------------------------------- sage: Building and installing modified Sage library files. Installing c_lib scons: `install' is up to date. Updating Cython code.... Building modified file sage/rings/polynomial/real_roots.pyx. sage/rings/polynomial/real_roots.pyx --> /home/jason/sage/local//lib/python/site-packages//sage/rings/polynomial/real_roots.pyx python2.5 `which cython` --embed-positions --incref-local-binop -I/home/jason/sage/devel/sage-main -o sage/rings/polynomial/real_roots.c sage/rings/polynomial/real_roots.pyx Traceback (most recent call last): File "/home/jason/sage/local/bin//cython", line 8, in <module> main(command_line = 1) File "/home/jason/sage/local/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 715, in main result = compile(sources, options) File "/home/jason/sage/local/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 692, in compile return compile_multiple(source, options) File "/home/jason/sage/local/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 662, in compile_multiple result = run_pipeline(source, options) File "/home/jason/sage/local/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 524, in run_pipeline err, enddata = context.run_pipeline(pipeline, source) File "/home/jason/sage/local/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 183, in run_pipeline data = phase(data) File "/home/jason/sage/local/lib/python2.5/site-packages/Cython/Compiler/Buffer.py", line 44, in __call__ use_py2_buffer_functions(node.scope) File "/home/jason/sage/local/lib/python2.5/site-packages/Cython/Compiler/Buffer.py", line 726, in use_py2_buffer_functions find_buffer_types(env) File "/home/jason/sage/local/lib/python2.5/site-packages/Cython/Compiler/Buffer.py", line 715, in find_buffer_types find_buffer_types(m) File "/home/jason/sage/local/lib/python2.5/site-packages/Cython/Compiler/Buffer.py", line 715, in find_buffer_types find_buffer_types(m) File "/home/jason/sage/local/lib/python2.5/site-packages/Cython/Compiler/Buffer.py", line 715, in find_buffer_types find_buffer_types(m) This last message is repeated *lots* of times, and I finally get: File "/home/jason/sage/local/lib/python2.5/site-packages/Cython/Compiler/Buffer.py", line 715, in find_buffer_types find_buffer_types(m) RuntimeError: maximum recursion depth exceeded Error running command, exited with status 256. sage: There was an error installing modified sage library code. Any help would be greatly appreciated. Can I use the buffer interface? Thanks, Jason --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---