| 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.)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.