def test_nearest(self):
     N = 5
     x = arange(N)
     y = arange(N)
     with warnings.catch_warnings():
         warnings.simplefilter("ignore", DeprecationWarning)
         self.assertAllclose(y, nearest(x, y, x + .1))
         self.assertAllclose(y, nearest(x, y, x - .1))
Beispiel #2
0
 def test_nearest(self):
     N = 5
     x = arange(N)
     y = arange(N)
     with suppress_warnings() as sup:
         sup.filter(DeprecationWarning, "`nearest` is deprecated")
         assert_allclose(y, nearest(x, y, x + .1))
         assert_allclose(y, nearest(x, y, x - .1))
 def test_nearest(self):
     N = 5
     x = arange(N)
     y = arange(N)
     with suppress_warnings() as sup:
         sup.filter(DeprecationWarning, "`nearest` is deprecated")
         assert_allclose(y, nearest(x, y, x+.1))
         assert_allclose(y, nearest(x, y, x-.1))
 def test_nearest(self):
     N = 5
     x = arange(N)
     y = arange(N)
     with warnings.catch_warnings():
         warnings.simplefilter("ignore", DeprecationWarning)
         self.assertAllclose(y, nearest(x, y, x+.1))
         self.assertAllclose(y, nearest(x, y, x-.1))
 def test_nearest(self):
     N = 5
     x = arange(N)
     y = arange(N)
     self.assertAllclose(y, nearest(x, y, x+.1))
     self.assertAllclose(y, nearest(x, y, x-.1))
Beispiel #6
0
 def test_nearest(self):
     N = 5
     x = arange(N)
     y = arange(N)
     self.assertAllclose(y, nearest(x, y, x + .1))
     self.assertAllclose(y, nearest(x, y, x - .1))