Jason Grout wrote:
> 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.
> 

FYI, Dag and I corresponded about this (see below).  So now the patch 
converting RDF/CDF vectors to use numpy is ready for review; see 
http://trac.sagemath.org/sage_trac/ticket/4206

Dag Sverre Seljebotn wrote:
 > Seems like an issue with circular cimports? Which means those aren't 
tested in the test framework. Anyway I was unable to provoke the 
behaviour with a testcase myself, but "coding in blind" then I assume 
that the following patch should fix it.
 >
 > Jason: To answer the question in the wiki about what to do for SAGE, 
I assume that we can quite quickly release a Cython 0.10.2 that 
incorporates this patch. Though Robert would be the one to give a real 
answer.
 >
 > diff -r 04e83ffd8ea2 Cython/Compiler/Buffer.py
 > --- a/Cython/Compiler/Buffer.py Fri Nov 07 06:55:37 2008 +0100
 > +++ b/Cython/Compiler/Buffer.py Sun Nov 23 16:58:15 2008 +0100
 > @@ -710,7 +710,11 @@ def use_py2_buffer_functions(env):
 >
 >      # Search all types for __getbuffer__ overloads
 >      types = []
 > +    visited_scopes = set()
 >      def find_buffer_types(scope):
 > +        if scope in visited_scopes:
 > +            return
 > +        visited_scopes.add(scope)
 >          for m in scope.cimported_modules:
 >              find_buffer_types(m)
 >          for e in scope.type_entries:
 >

This patch made it compile and all the doctests pass.

Can we get this patch (or an equivalent one) into Sage as soon as possible?


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
-~----------~----~----~----~------~----~------~--~---

Reply via email to