On Apr 1, 2009, at 11:59 PM, Tom wrote:

> I want to write a Cython version of a Python function f(m) where the
> input is a sage matrix of the form
>
> m= matrix(GF(p), n, k)
>
> How can I pass m to the .spyx function?  I couldn't find any examples
> online.
>
> My only idea is to convert m to a matrix over Z, and then to a list,
> but I'm assuming there must be a better way.

I am assuming your .spyx file looks something has something like

def f(m):
     ...

in which case you can do

sage: load my_file.spyx
sage: m= matrix(GF(p), n, k)
sage: f(m)

- Robert

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to