From f72c2dfd7d188f1ee9d795ba66c001aa7263c319 Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Wed, 16 Sep 2009 07:13:23 +0000 Subject: Move linspace and logspace into core. --- numpy/lib/tests/test_index_tricks.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'numpy/lib/tests/test_index_tricks.py') diff --git a/numpy/lib/tests/test_index_tricks.py b/numpy/lib/tests/test_index_tricks.py index d7e61799a..3307cef3e 100644 --- a/numpy/lib/tests/test_index_tricks.py +++ b/numpy/lib/tests/test_index_tricks.py @@ -24,6 +24,11 @@ class TestGrid(TestCase): assert_almost_equal(b[-1],b[0]+19*0.1,11) assert_almost_equal(a[1]-a[0],2.0/9.0,11) + def test_linspace_equivalence(self): + y,st = np.linspace(2,10,retstep=1) + assert_almost_equal(st,8/49.0) + assert_array_almost_equal(y,mgrid[2:10:50j],13) + def test_nd(self): c = mgrid[-1:1:10j,-2:2:10j] d = mgrid[-1:1:0.1,-2:2:0.2] -- cgit v1.2.1