From 17746c85d05ee8098d6c6b63763fe8894f17a65b Mon Sep 17 00:00:00 2001 From: burgersmoke Date: Tue, 23 Apr 2019 12:07:26 -0600 Subject: [PATCH 1/2] Allowing for backwards compatibility of xrange() so that Python 2 and 3 can both function for now. This implies that 'future' needs to be installed. --- src/SIF_embedding.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/SIF_embedding.py b/src/SIF_embedding.py index 4e523b5..e6ebdda 100644 --- a/src/SIF_embedding.py +++ b/src/SIF_embedding.py @@ -1,6 +1,8 @@ import numpy as np from sklearn.decomposition import TruncatedSVD +# Python3 compatibility +from past.builtins import xrange def get_weighted_average(We, x, w): """ From 94baedc93ee0318d366d52bf91120f1bfcfa90ab Mon Sep 17 00:00:00 2001 From: burgersmoke Date: Tue, 23 Apr 2019 12:19:29 -0600 Subject: [PATCH 2/2] Adding 'future' to requirements to allow Python 2 and 3 to both function. --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 87ce38c..467e738 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ scipy sklearn theano lasagne +future