Skip to content

Commit

Permalink
comment out broken function
Browse files Browse the repository at this point in the history
  • Loading branch information
GiacomoPope committed Aug 9, 2024
1 parent 83f2179 commit 525883f
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/flint/types/fq_default.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -881,14 +881,15 @@ cdef class fq_default(flint_scalar):
fq_default_frobenius(res.val, self.val, <slong>e, self.ctx.val)
return res

def is_primitive(self):
"""
"""
if self.ctx.fq_type == 1:
return 1 == fq_zech_is_primitive((<fq_default>self).val.fq_zech, (<fq_default_ctx>self.ctx).val.fq_zech)
elif self.ctx.fq_type == 2:
return 1 == fq_nmod_is_primitive((<fq_default>self).val.fq_nmod, (<fq_default_ctx>self.ctx).val.fq_nmod)
elif self.ctx.fq_type == 3:
return 1 == fq_is_primitive((<fq_default>self).val.fq, (<fq_default_ctx>self.ctx).val.fq)
else:
return NotImplemented
# TODO: this crashes as the context cannot be found during compile time.
# def is_primitive(self):
# """
# """
# if self.ctx.fq_type == 1:
# return 1 == fq_zech_is_primitive((<fq_default>self).val.fq_zech, (<fq_default_ctx>self.ctx).val.fq_zech)
# elif self.ctx.fq_type == 2:
# return 1 == fq_nmod_is_primitive((<fq_default>self).val.fq_nmod, (<fq_default_ctx>self.ctx).val.fq_nmod)
# elif self.ctx.fq_type == 3:
# return 1 == fq_is_primitive((<fq_default>self).val.fq, (<fq_default_ctx>self.ctx).val.fq)
# else:
# return NotImplemented

0 comments on commit 525883f

Please sign in to comment.