Hi,
Thanks Prof.Rudi and Prof.Stefan for the suggestions.
I think i found out the reason.As per my understanding, the sage runtime expects the return value of a function to be of Sage class and it should implement some necessary functions.
So when i changed the return value to
BasisMatroid(a class) from
Matroid (which is not a class), it showed no errors.I've pushed the branch, and set the status to needs-review.
You may want to have a look and provide further suggestions,as my implementation may not be clean and the algo (which is a fairly straight-forward one) may be improved.
Thanks
Rajesh Veeranki
Final year,B.Tech C.S.E,IIT Bombay