On Jul 10, 2007, at 15:12 , William Stein wrote:

> On 7/10/07, Justin C. Walker <[EMAIL PROTECTED]> wrote:
>> On Jul 10, 2007, at 2:45 PM, Robert Bradshaw wrote:
[snip]
> You can write a Python wrapper for get_unsafe, e.g., I just tried
> this by adding this to matrix0.pyx (try the attached patch).
> Note that it's actually *not* faster -- it's slower in some cases --
> I think this is because calling __getitem__ goes through "slots",
> but the Python method that wraps get_unsafe doesn't.
>
> You probably want to create a small .pyx file that contains the
> code you want to be fast, and call it from your .py file.  Just
> copy something already done, and add something to setup.py (again
> copying what is there).

Thanks!  This is what I am trying, based on Robert's previous comments.

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Absorption of Federal Funds
--------
Some people have a mental horizon of radius zero, and
call it their point of view.
   -- David Hilbert
--------



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