Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Revert "Update tests to use numpy.testing"
This reverts commit 882109c.
  • Loading branch information
Brandon Amos committed Oct 16, 2016
1 parent 882109c commit 4d02805
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/openface_api_tests.py
Expand Up @@ -19,7 +19,6 @@
import os

import numpy as np
import numpy.testing as npt
np.set_printoptions(precision=2)

import scipy
Expand Down Expand Up @@ -64,4 +63,5 @@ def test_pipeline():

rep = net.forward(alignedFace)
cosDist = scipy.spatial.distance.cosine(rep, np.ones(128))
npt.assert_almost_equal(cosDist, 0.938840385931)
print(cosDist)
assert np.isclose(cosDist, 0.938840385931)
3 changes: 1 addition & 2 deletions tests/openface_batch_represent_tests.py
Expand Up @@ -20,7 +20,6 @@
import tempfile

import numpy as np
import numpy.testing as npt
np.set_printoptions(precision=2)
import pandas as pd
import scipy
Expand Down Expand Up @@ -87,6 +86,6 @@ def test_batch_represent():

cosDist = scipy.spatial.distance.cosine(brody1, brody2)
print('cosDist:', cosDist)
npt.assert_almost_equal(cosDist, 0.1568, decimal=4)
assert np.isclose(cosDist, 0.1568, atol=1e-4)

shutil.rmtree(workDir)

0 comments on commit 4d02805

Please sign in to comment.