On Oct 30, 1:48 pm, Robert Bradshaw <[EMAIL PROTECTED]>
wrote:
> This is due to the inplace operator stuff using refcounts to
> determine if it's safe to mutate. The simple workaround is to not use
> numpy arrays of SAGE objects. Another question is why would one do so
> (i.e. what is lacking in the SAGE linear algebra types?) I think the
> benifits of inplace operators in terms of performance are to great to
> abandon, but am at loss to find a clean solution so that external
> extension classes don't mess them up... other than perhaps a global
> option that can be enabled/disabled.

I can think of lots of "solutions", although I don't know which of
them might be worth the effort.

1) a global enable/disable
2) hook into __import__ to notice imports of numpy, and turn off the
optimization globally if numpy is ever imported
3) patch numpy to add the incref/decref operations
4) patch numpy to turn off the optimization on entry to dangerous
functions, and turn the optimization back on at exit

Carl


--~--~---------~--~----~------------~-------~--~----~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to