uawdijnntqw1x1x1
IP : 216.73.217.126
Hostname : pluto.ca.planethoster.net
Kernel : Linux pluto.ca.planethoster.net 3.10.0-962.3.2.lve1.5.38.el7.x86_64 #1 SMP Thu Jun 18 05:28:41 EDT 2020 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
..
/
usr
/
include
/
numpy
/
..
/
..
/
tests
/
test_function_base.py
/
/
from numpy.testing import * from numpy import logspace, linspace class TestLogspace(TestCase): def test_basic(self): y = logspace(0,6) assert_(len(y)==50) y = logspace(0,6,num=100) assert_(y[-1] == 10**6) y = logspace(0,6,endpoint=0) assert_(y[-1] < 10**6) y = logspace(0,6,num=7) assert_array_equal(y,[1,10,100,1e3,1e4,1e5,1e6]) class TestLinspace(TestCase): def test_basic(self): y = linspace(0,10) assert_(len(y)==50) y = linspace(2,10,num=100) assert_(y[-1] == 10) y = linspace(2,10,endpoint=0) assert_(y[-1] < 10) def test_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]) def test_type(self): t1 = linspace(0,1,0).dtype t2 = linspace(0,1,1).dtype t3 = linspace(0,1,2).dtype assert_equal(t1, t2) assert_equal(t2, t3)
/home/../usr/include/numpy/../../tests/test_function_base.py