Skip to content

Commit

Permalink
Use math.gcd instead of fractions.gcd when possible
Browse files Browse the repository at this point in the history
fractions.gcd() function has been removed from Python 3.9, it was
deprecated since Python 3.5.

https://docs.python.org/3.9/whatsnew/3.9.html#removed
  • Loading branch information
hroncok committed Feb 5, 2020
1 parent 4270277 commit 3c5de93
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion theano/tensor/nnet/abstract_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
import logging
from six import reraise, integer_types
import sys
from fractions import gcd
try:
from math import gcd
except ImportError:
from fractions import gcd

import theano

Expand Down

0 comments on commit 3c5de93

Please sign in to comment.