From a1445160dea079dd0e1c82fcda7729d3809b13d7 Mon Sep 17 00:00:00 2001 From: cookedm Date: Tue, 16 May 2006 23:34:24 +0000 Subject: #118: linspace should always return floats Patch from stefan; fix special case which could return an array of one int. --- numpy/lib/tests/test_function_base.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'numpy/lib/tests/test_function_base.py') diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index 3a603923a..372929447 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -87,6 +87,11 @@ class test_linspace(ScipyTestCase): y = list(linspace(0,1,2.5)) assert y == [0.0, 1.0] + def check_type(self): + t1 = linspace(0,1,0).dtype + t2 = linspace(0,1,1).dtype + assert_equal(t1, t2) + class test_amax(ScipyTestCase): def check_basic(self): a = [3,4,5,10,-3,-5,6.0] -- cgit v1.2.1