---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-235f39fb115c> in <module>()
1 # Test: Make sure the evaluated policy is what we expected
2 expected_v = np.array([0, -14, -20, -22, -14, -18, -20, -20, -20, -20, -18, -14, -22, -20, -14, 0])
----> 3 np.testing.assert_array_almost_equal(v, expected_v, decimal=2)
/Users/dennybritz/venvs/tf/lib/python3.5/site-packages/numpy/testing/utils.py in assert_array_almost_equal(x, y, decimal, err_msg, verbose)
914 assert_array_compare(compare, x, y, err_msg=err_msg, verbose=verbose,
915 header=('Arrays are not almost equal to %d decimals' % decimal),
--> 916 precision=decimal)
917
918
/Users/dennybritz/venvs/tf/lib/python3.5/site-packages/numpy/testing/utils.py in assert_array_compare(comparison, x, y, err_msg, verbose, header, precision)
735 names=('x', 'y'), precision=precision)
736 if not cond:
--> 737 raise AssertionError(msg)
738 except ValueError:
739 import traceback
AssertionError:
Arrays are not almost equal to 2 decimals
(mismatch 87.5%)
x: array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0.])
y: array([ 0, -14, -20, -22, -14, -18, -20, -20, -20, -20, -18, -14, -22,
-20, -14, 0])