/usr/lib64/python2.6/site-packages/numpy/core/tests
NameSizeModeActions
data/-0755rm
test_blasdot.py4650644editdlrm
test_blasdot.pyc9900644editdlrm
test_blasdot.pyo9900644editdlrm
test_defchararray.py235830644editdlrm
test_defchararray.pyc368470644editdlrm
test_defchararray.pyo323920644editdlrm
test_dtype.py39870644editdlrm
test_dtype.pyc65460644editdlrm
test_dtype.pyo65460644editdlrm
test_errstate.py17120644editdlrm
test_errstate.pyc16540644editdlrm
test_errstate.pyo16540644editdlrm
test_function_base.py9840644editdlrm
test_function_base.pyc23190644editdlrm
test_function_base.pyo20170644editdlrm
test_getlimits.py16300644editdlrm
test_getlimits.pyc37990644editdlrm
test_getlimits.pyo37990644editdlrm
test_machar.py10000644editdlrm
test_machar.pyc17050644editdlrm
test_machar.pyo17050644editdlrm
test_memmap.py21010644editdlrm
test_memmap.pyc33410644editdlrm
test_memmap.pyo32890644editdlrm
test_multiarray.py518580644editdlrm
test_multiarray.pyc702540644editdlrm
test_multiarray.pyo696390644editdlrm
test_numeric.py307730644editdlrm
test_numeric.pyc480280644editdlrm
test_numeric.pyo459700644editdlrm
test_numerictypes.py141940644editdlrm
test_numerictypes.pyc179080644editdlrm
test_numerictypes.pyo175720644editdlrm
test_print.py80910644editdlrm
test_print.pyc92240644editdlrm
test_print.pyo92240644editdlrm
test_records.py53250644editdlrm
test_records.pyc91830644editdlrm
test_records.pyo85340644editdlrm
test_regression.py430970644editdlrm
test_regression.pyc670250644editdlrm
test_regression.pyo625030644editdlrm
test_scalarmath.py37890644editdlrm
test_scalarmath.pyc53950644editdlrm
test_scalarmath.pyo50960644editdlrm
test_shape_base.py45710644editdlrm
test_shape_base.pyc88900644editdlrm
test_shape_base.pyo83260644editdlrm
test_ufunc.py169440644editdlrm
test_ufunc.pyc183660644editdlrm
test_ufunc.pyo181350644editdlrm
test_umath.py359910644editdlrm
test_umath.pyc547650644editdlrm
test_umath.pyo513770644editdlrm
test_umath_complex.py177280644editdlrm
test_umath_complex.pyc168860644editdlrm
test_umath_complex.pyo168860644editdlrm
test_unicode.py112550644editdlrm
test_unicode.pyc150700644editdlrm
test_unicode.pyo150700644editdlrm
Edit: /usr/lib64/python2.6/site-packages/numpy/core/tests/test_shape_base.py (4571B)
from numpy.testing import * from numpy.core import array, atleast_1d, atleast_2d, atleast_3d, vstack, \ hstack, newaxis class TestAtleast1d(TestCase): def test_0D_array(self): a = array(1); b = array(2); res=map(atleast_1d,[a,b]) desired = [array([1]),array([2])] assert_array_equal(res,desired) def test_1D_array(self): a = array([1,2]); b = array([2,3]); res=map(atleast_1d,[a,b]) desired = [array([1,2]),array([2,3])] assert_array_equal(res,desired) def test_2D_array(self): a = array([[1,2],[1,2]]); b = array([[2,3],[2,3]]); res=map(atleast_1d,[a,b]) desired = [a,b] assert_array_equal(res,desired) def test_3D_array(self): a = array([[1,2],[1,2]]); b = array([[2,3],[2,3]]); a = array([a,a]);b = array([b,b]); res=map(atleast_1d,[a,b]) desired = [a,b] assert_array_equal(res,desired) def test_r1array(self): """ Test to make sure equivalent Travis O's r1array function """ assert(atleast_1d(3).shape == (1,)) assert(atleast_1d(3j).shape == (1,)) assert(atleast_1d(3L).shape == (1,)) assert(atleast_1d(3.0).shape == (1,)) assert(atleast_1d([[2,3],[4,5]]).shape == (2,2)) class TestAtleast2d(TestCase): def test_0D_array(self): a = array(1); b = array(2); res=map(atleast_2d,[a,b]) desired = [array([[1]]),array([[2]])] assert_array_equal(res,desired) def test_1D_array(self): a = array([1,2]); b = array([2,3]); res=map(atleast_2d,[a,b]) desired = [array([[1,2]]),array([[2,3]])] assert_array_equal(res,desired) def test_2D_array(self): a = array([[1,2],[1,2]]); b = array([[2,3],[2,3]]); res=map(atleast_2d,[a,b]) desired = [a,b] assert_array_equal(res,desired) def test_3D_array(self): a = array([[1,2],[1,2]]); b = array([[2,3],[2,3]]); a = array([a,a]);b = array([b,b]); res=map(atleast_2d,[a,b]) desired = [a,b] assert_array_equal(res,desired) def test_r2array(self): """ Test to make sure equivalent Travis O's r2array function """ assert(atleast_2d(3).shape == (1,1)) assert(atleast_2d([3j,1]).shape == (1,2)) assert(atleast_2d([[[3,1],[4,5]],[[3,5],[1,2]]]).shape == (2,2,2)) class TestAtleast3d(TestCase): def test_0D_array(self): a = array(1); b = array(2); res=map(atleast_3d,[a,b]) desired = [array([[[1]]]),array([[[2]]])] assert_array_equal(res,desired) def test_1D_array(self): a = array([1,2]); b = array([2,3]); res=map(atleast_3d,[a,b]) desired = [array([[[1],[2]]]),array([[[2],[3]]])] assert_array_equal(res,desired) def test_2D_array(self): a = array([[1,2],[1,2]]); b = array([[2,3],[2,3]]); res=map(atleast_3d,[a,b]) desired = [a[:,:,newaxis],b[:,:,newaxis]] assert_array_equal(res,desired) def test_3D_array(self): a = array([[1,2],[1,2]]); b = array([[2,3],[2,3]]); a = array([a,a]);b = array([b,b]); res=map(atleast_3d,[a,b]) desired = [a,b] assert_array_equal(res,desired) class TestHstack(TestCase): def test_0D_array(self): a = array(1); b = array(2); res=hstack([a,b]) desired = array([1,2]) assert_array_equal(res,desired) def test_1D_array(self): a = array([1]); b = array([2]); res=hstack([a,b]) desired = array([1,2]) assert_array_equal(res,desired) def test_2D_array(self): a = array([[1],[2]]); b = array([[1],[2]]); res=hstack([a,b]) desired = array([[1,1],[2,2]]) assert_array_equal(res,desired) class TestVstack(TestCase): def test_0D_array(self): a = array(1); b = array(2); res=vstack([a,b]) desired = array([[1],[2]]) assert_array_equal(res,desired) def test_1D_array(self): a = array([1]); b = array([2]); res=vstack([a,b]) desired = array([[1],[2]]) assert_array_equal(res,desired) def test_2D_array(self): a = array([[1],[2]]); b = array([[1],[2]]); res=vstack([a,b]) desired = array([[1],[2],[1],[2]]) assert_array_equal(res,desired) def test_2D_array2(self): a = array([1,2]); b = array([1,2]); res=vstack([a,b]) desired = array([[1,2],[1,2]]) assert_array_equal(res,desired)