summaryrefslogtreecommitdiff
path: root/scipy/base/tests/test_function_base.py
diff options
context:
space:
mode:
authorcookedm <cookedm@localhost>2005-12-06 21:52:17 +0000
committercookedm <cookedm@localhost>2005-12-06 21:52:17 +0000
commitf487b5a30df5ce841cc2ddde91af6d5ea0fe2134 (patch)
tree3e288ba900608395a670d555fc8fdb19f47c1aa3 /scipy/base/tests/test_function_base.py
parent6c30140dc13115f7c7b1e8df9bf5be79da57ca10 (diff)
downloadnumpy-f487b5a30df5ce841cc2ddde91af6d5ea0fe2134.tar.gz
More robust corner cases for linspace
Diffstat (limited to 'scipy/base/tests/test_function_base.py')
-rw-r--r--scipy/base/tests/test_function_base.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/scipy/base/tests/test_function_base.py b/scipy/base/tests/test_function_base.py
index 4275beff5..25d143315 100644
--- a/scipy/base/tests/test_function_base.py
+++ b/scipy/base/tests/test_function_base.py
@@ -81,6 +81,12 @@ class test_linspace(unittest.TestCase):
assert_almost_equal(st,8/49.0)
assert_array_almost_equal(y,mgrid[2:10:50j],13)
+ def check_corner(self):
+ y = list(linspace(0,1,1))
+ assert y == [0.0], y
+ y = list(linspace(0,1,2.5))
+ assert y == [0.0, 1.0]
+
class test_amax(unittest.TestCase):
def check_basic(self):
a = [3,4,5,10,-3,-5,6.0]
@@ -90,7 +96,7 @@ class test_amax(unittest.TestCase):
[8,3.0,2.0]]
assert_equal(amax(b,axis=0),[8.0,10.0,9.0])
assert_equal(amax(b,axis=1),[9.0,10.0,8.0])
-
+
class test_amin(unittest.TestCase):
def check_basic(self):
a = [3,4,5,10,-3,-5,6.0]