Skip to content

Commit

Permalink
Update poly.py
Browse files Browse the repository at this point in the history
  • Loading branch information
teschlg committed Jul 22, 2024
1 parent 5fe1009 commit d6cac70
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kryptools/poly.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ class Poly:
"""

def __init__(self, coeff: list, ring = None, modulus: list = None):
for i in range(len(coeff) - 1, 0, -1):
if coeff[i]:
self.coeff = list(coeff)
for i in range(len(self.coeff) - 1, 0, -1):
if self.coeff[i]:
break
coeff.pop(i)
self.coeff = coeff
self.coeff.pop(i)
self.modulus = modulus
if ring:
self.map(ring)
Expand Down

0 comments on commit d6cac70

Please sign in to comment.