Commit 719a506a authored by Bharath Ramsundar's avatar Bharath Ramsundar Committed by GitHub
Browse files

Merge pull request #393 from lilleswing/python36tests

Python36Tests: Small Changes For Python 3.6 compatability
parents 34ae6aa0 4c67955e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ install:
- conda install h5py
- pip install six
#- pip install keras
- conda install -c conda-forge protobuf=3.1.0
- export KERAS_BACKEND=tensorflow
- conda install -c omnia mdtraj
- pip install tensorflow
+3 −3
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ class TestSupports(unittest.TestCase):
    y = np.random.randint(2, size=(n_samples, n_tasks))
    w = np.ones((n_samples, n_tasks))
    # Set last n_samples/2 weights to 0
    w[n_samples/2:] = 0
    w[n_samples//2:] = 0
    dataset = dc.data.NumpyDataset(X, y, w, ids)

    n_episodes = 20
@@ -307,12 +307,12 @@ class TestSupports(unittest.TestCase):
    y = np.random.randint(2, size=(n_samples, n_tasks))
    w = np.ones((n_samples, n_tasks))
    # Set last n_samples/2 weights to 0
    w[n_samples/2:] = 0
    w[n_samples//2:] = 0
    dataset = dc.data.NumpyDataset(X, y, w, ids)

    # Sample from first n_samples/2 elements for support
    support_inds = sorted(np.random.choice(
        np.arange(n_samples/2), (n_support,), replace=False))
        np.arange(n_samples//2), (n_support,), replace=False))
    support_dataset = dc.data.NumpyDataset(X[support_inds], y[support_inds],
                                           w[support_inds], ids[support_inds])