Skip to content

Commit 47433d6

Browse files
committed
Fix #96 : fractions.gcd is deprecated
1 parent 97003c0 commit 47433d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

commpy/channelcoding/gfields.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
""" Galois Fields """
55

6-
from fractions import gcd
6+
from math import gcd
77

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

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

5757
# Overloading addition operator for Galois Field
5858
def __add__(self, x):

0 commit comments

Comments
 (0)