Skip to content

Commit

Permalink
Fix #96 : fractions.gcd is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
BastienTr committed Jan 4, 2021
1 parent 97003c0 commit 47433d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commpy/channelcoding/gfields.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

""" Galois Fields """

from fractions import gcd
from math import gcd

from numpy import array, zeros, arange, convolve, ndarray, concatenate

Expand Down Expand Up @@ -52,7 +52,7 @@ def __init__(self, x, m):
if type(x) is int and x >= 0 and x < pow(2, m):
self.elements = array([x])
elif type(x) is ndarray and len(x) >= 1:
self.elements = x
self.elements = x.astype(int)

# Overloading addition operator for Galois Field
def __add__(self, x):
Expand Down

0 comments on commit 47433d6

Please sign in to comment.