I am trying to add a few extra methods to a matrix type from the pysparse library. Apart from that I want the new class to behave exactly like the original, so I chose to implement the changes using inheritance. However, when I try
from pysparse import spmatrix
class ll_mat(spmatrix.ll_mat):
pass
this results in the following error
TypeError: Error when calling the metaclass bases
cannot create 'builtin_function_or_method' instances
What is this causing this error? Is there a way to use delegation so that my new class behaves exactly the same way as the original?