1 | initial version |
You need to define the method set_from_mpz
in your new class: the __init__
method for IntegerMod_abstract
calls it, but it's not defined in IntegerMod_abstract
— it's defined separately in each class that inherits from that one. This is what the error message
Exception ignored in: 'sage.rings.finite_rings.integer_mod.IntegerMod_abstract.set_from_mpz'
Traceback (most recent call last):
File "<string>", line 5, in __init__
NotImplementedError: must be defined in child class
means.
(I am not a Cython expert, so there may be other requirements in addition when trying to base a class on a Cython class.)