Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cdd2bcb

Browse files
committed
Use assert_almost_equal from NumPy in mlab tests.
1 parent 54f3683 commit cdd2bcb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/matplotlib/tests/test_mlab.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
import tempfile
77

8-
from numpy.testing import assert_allclose, assert_array_equal
8+
from numpy.testing import (assert_allclose, assert_almost_equal,
9+
assert_array_equal)
910
import numpy.ma.testutils as matest
1011
import numpy as np
1112
import datetime as datetime
1213
import pytest
13-
from nose.tools import (assert_almost_equal)
1414

1515
import matplotlib.mlab as mlab
1616
import matplotlib.cbook as cbook
@@ -2922,9 +2922,9 @@ def test_kde_bandwidth_method(self):
29222922
xs = np.linspace(-7, 7, 51)
29232923
kdepdf = gkde.evaluate(xs)
29242924
kdepdf2 = gkde2.evaluate(xs)
2925-
assert_almost_equal(kdepdf.all(), kdepdf2.all())
2925+
assert kdepdf.all() == kdepdf2.all()
29262926
kdepdf3 = gkde3.evaluate(xs)
2927-
assert_almost_equal(kdepdf.all(), kdepdf3.all())
2927+
assert kdepdf.all() == kdepdf3.all()
29282928

29292929

29302930
class Test_gaussian_kde_custom(object):

0 commit comments

Comments
 (0)