Search Results

Search found 1 results on 1 pages for 'pysparse'.

Page 1/1 | 1 

  • Python: unable to inherit from a C extension.

    - by celil
    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?

    Read the article

1