[Scipy-svn] r5581 - in trunk/scipy/io/matlab/tests: . data

scipy-svn at scipy.org scipy-svn at scipy.org
Fri Feb 20 18:40:32 EST 2009


Author: matthew.brett at gmail.com
Date: 2009-02-20 17:40:19 -0600 (Fri, 20 Feb 2009)
New Revision: 5581

Added:
   trunk/scipy/io/matlab/tests/data/test3dmatrix_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/testcell_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/testcellnest_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/testcomplex_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/testdouble_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/testemptycell_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/testfunc_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/testmatrix_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/testminus_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/testmulti_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/testobject_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/testonechar_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/testscalarcell_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/testsparse_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/testsparsecomplex_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/testsparsefloat_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/teststring_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/teststringarray_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/teststruct_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/teststructarr_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/teststructnest_7.4_GLNX86.mat
   trunk/scipy/io/matlab/tests/data/testunicode_7.4_GLNX86.mat
Modified:
   trunk/scipy/io/matlab/tests/gen_mat5files.m
   trunk/scipy/io/matlab/tests/save_matfile.m
   trunk/scipy/io/matlab/tests/test_mio.py
Log:
Minor expansion of tests and new datafiles

Added: trunk/scipy/io/matlab/tests/data/test3dmatrix_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/test3dmatrix_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/testcell_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/testcell_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/testcellnest_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/testcellnest_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/testcomplex_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/testcomplex_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/testdouble_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/testdouble_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/testemptycell_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/testemptycell_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/testfunc_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/testfunc_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/testmatrix_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/testmatrix_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/testminus_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/testminus_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/testmulti_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/testmulti_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/testobject_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/testobject_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/testonechar_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/testonechar_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/testscalarcell_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/testscalarcell_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/testsparse_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/testsparse_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/testsparsecomplex_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/testsparsecomplex_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/testsparsefloat_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/testsparsefloat_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/teststring_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/teststring_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/teststringarray_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/teststringarray_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/teststruct_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/teststruct_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/teststructarr_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/teststructarr_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/teststructnest_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/teststructnest_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/scipy/io/matlab/tests/data/testunicode_7.4_GLNX86.mat
===================================================================
(Binary files differ)


Property changes on: trunk/scipy/io/matlab/tests/data/testunicode_7.4_GLNX86.mat
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/scipy/io/matlab/tests/gen_mat5files.m
===================================================================
--- trunk/scipy/io/matlab/tests/gen_mat5files.m	2009-02-20 19:40:23 UTC (rev 5580)
+++ trunk/scipy/io/matlab/tests/gen_mat5files.m	2009-02-20 23:40:19 UTC (rev 5581)
@@ -59,6 +59,9 @@
 	  {['This cell contains this string and 3 arrays of increasing' ...
 	    ' length'], 1., 1.:2., 1.:3.});
 
+% scalar cell
+save_matfile('testscalarcell', {1})
+
 % Empty cells in two cell matrices
 save_matfile('testemptycell', {1, 2, [], [], 3});
 
@@ -80,7 +83,7 @@
 save_matfile('testobject', inline('x'))
 
 % array of matlab objects
-%save_matfile('testobjarr', [inline('x') inline('y')])
+%save_matfile('testobjarr', [inline('x') inline('x')])
 
 % unicode test
 if str2num(mlv) > 7  % function added 7.0.1
@@ -90,7 +93,8 @@
   save_matfile('testunicode', native2unicode(from_japan, 'utf-8'));
 end
   
-% sparse float
-
-
-% sparse complex
+% func
+if str2num(mlv) > 7  % function pointers added recently
+  func = @afunc;
+  save_matfile('testfunc', func);
+end
\ No newline at end of file

Modified: trunk/scipy/io/matlab/tests/save_matfile.m
===================================================================
--- trunk/scipy/io/matlab/tests/save_matfile.m	2009-02-20 19:40:23 UTC (rev 5580)
+++ trunk/scipy/io/matlab/tests/save_matfile.m	2009-02-20 23:40:19 UTC (rev 5581)
@@ -1,6 +1,6 @@
-function save_test(test_name, v)
+function save_matfile(test_name, v)
 % saves variable passed in m with filename from prefix
   
 global FILEPREFIX FILESUFFIX
 eval([test_name ' = v;']);
-save([FILEPREFIX test_name FILESUFFIX], test_name, '-V7.3')
\ No newline at end of file
+save([FILEPREFIX test_name FILESUFFIX], test_name)
\ No newline at end of file

Modified: trunk/scipy/io/matlab/tests/test_mio.py
===================================================================
--- trunk/scipy/io/matlab/tests/test_mio.py	2009-02-20 19:40:23 UTC (rev 5580)
+++ trunk/scipy/io/matlab/tests/test_mio.py	2009-02-20 23:40:19 UTC (rev 5581)
@@ -100,7 +100,13 @@
     mlarr([]),
     mlarr([]),
     mlarr(3)), dtype=object).reshape(1,-1)
+objarr = np.empty((1,1),dtype=object)
+objarr[0,0] = mlarr(1)
 case_table5.append(
+    {'name': 'scalarcell',
+     'expected': {'testscalarcell': objarr}
+     })
+case_table5.append(
     {'name': 'emptycell',
      'expected': {'testemptycell': CAE}})
 case_table5.append(
@@ -174,29 +180,27 @@
     {'name': 'unicode',
     'expected': {'testunicode': array([u_str])}
     })
+case_table5.append(
+    {'name': 'sparse',
+     'expected': {'testsparse': SP.coo_matrix(A)},
+     })
+case_table5.append(
+    {'name': 'sparsecomplex',
+     'expected': {'testsparsecomplex': SP.coo_matrix(B)},
+     })
+'''
+case_table5.append(
+    {'name': 'func',
+     'expected': {'testfunc': 0},
+     })
+'''
 
 # These should also have matlab load equivalents,
-# but I can't get to matlab at the moment
 case_table5_rt = case_table5[:]
+# Inline functions can't be concatenated in matlab
 case_table5_rt.append(
-    {'name': 'sparsefloat',
-     'expected': {'testsparsefloat':
-                  SP.coo_matrix(array([[1,0,2],[0,-3.5,0]]))},
-     })
-case_table5_rt.append(
-    {'name': 'sparsecomplex',
-     'expected': {'testsparsecomplex':
-                  SP.coo_matrix(array([[-1+2j,0,2],[0,-3j,0]]))},
-     })
-case_table5_rt.append(
     {'name': 'objectarray',
      'expected': {'testobjectarray': np.repeat(MO, 2).reshape(1,2)}})
-objarr = np.empty((1,1),dtype=object)
-objarr[0,0] = mlarr(1)
-case_table5_rt.append(
-    {'name': 'scalarobject',
-     'expected': {'testscalarobject': objarr}
-     })
 
 
 def types_compatible(var1, var2):




More information about the Scipy-svn mailing list