Hey everyone:
I'm currently in the process of converting some code from Mathematica to Sage, my primary motivation being that Mathematica is running it too slowly and I was hoping that I could somehow get some increase in speed with Sage. My thought was that this would be easiest if I were able to use cython along with Sage. Is this currently possible? For example, one of the Mathematica functions takes a polynomial in 2 variables as input and computes the value of the order in one of the variables (ie for x1^3 + x1*x2^2 + x2, the order for x1 would be 3). I wrote some Sage could that can do this, but then how can I use what the sage code computes with cython code? When I was trying to compile some cython code in Cocalc using %cython, it would not let me include any Sage code. For eg, I tried including the line:
but it threw errors at me. Do you think I am approaching this speed up idea in a reasonable way? Or should I be trying to do it purely in Sage or purely in cython? Thanks!