From 1689cf3a776744e76ab878d437c74f6e8a1e99c1 Mon Sep 17 00:00:00 2001 From: Steve Chien <45402855+schien1729@users.noreply.github.com> Date: Mon, 7 Jan 2019 13:44:35 -0800 Subject: [PATCH] Revert "Fix Python 3 compatibility issues" --- privacy/analysis/rdp_accountant.py | 5 ----- privacy/optimizers/dp_optimizer_test.py | 5 ----- privacy/optimizers/gaussian_query_test.py | 5 ----- privacy/optimizers/nested_query_test.py | 5 ----- 4 files changed, 20 deletions(-) diff --git a/privacy/analysis/rdp_accountant.py b/privacy/analysis/rdp_accountant.py index 8c63dfe..fbc3dc0 100644 --- a/privacy/analysis/rdp_accountant.py +++ b/privacy/analysis/rdp_accountant.py @@ -46,11 +46,6 @@ import sys import numpy as np from scipy import special -try: - long -except NameError: - long = int - ######################## # LOG-SPACE ARITHMETIC # ######################## diff --git a/privacy/optimizers/dp_optimizer_test.py b/privacy/optimizers/dp_optimizer_test.py index fe8e461..a5f24d2 100644 --- a/privacy/optimizers/dp_optimizer_test.py +++ b/privacy/optimizers/dp_optimizer_test.py @@ -24,11 +24,6 @@ import tensorflow as tf from privacy.optimizers import dp_optimizer -try: - xrange -except NameError: - xrange = range - def loss(val0, val1): """Loss function that is minimized at the mean of the input points.""" diff --git a/privacy/optimizers/gaussian_query_test.py b/privacy/optimizers/gaussian_query_test.py index 37b8789..43c9085 100644 --- a/privacy/optimizers/gaussian_query_test.py +++ b/privacy/optimizers/gaussian_query_test.py @@ -24,11 +24,6 @@ import tensorflow as tf from privacy.optimizers import gaussian_query -try: - xrange -except NameError: - xrange = range - def _run_query(query, records): """Executes query on the given set of records as a single sample. diff --git a/privacy/optimizers/nested_query_test.py b/privacy/optimizers/nested_query_test.py index add2fe1..134dbb2 100644 --- a/privacy/optimizers/nested_query_test.py +++ b/privacy/optimizers/nested_query_test.py @@ -30,11 +30,6 @@ nest = tf.contrib.framework.nest _basic_query = gaussian_query.GaussianSumQuery(1.0, 0.0) -try: - xrange -except NameError: - xrange = range - def _run_query(query, records): """Executes query on the given set of records as a single sample.